Optional
afterCallback that will be invoked when the server response has been received and processed or when the request has been failed without a response.
The originating request will be available as the request
property
on either the error or response object.
Error encountered when handling this request or null
.
Optional
res: globalThis.Response & { Response object for this request, if no error occurred.
Optional
allowWhether ArangoDB is allowed to perform a dirty read to respond to the
request. If set to true
, the response may reflect a dirty state from
a non-authoritative server.
Default: false
Optional
beforeCallback that will be invoked with the finished request object before it is finalized. In the browser the request may already have been sent.
Request object or XHR instance used for this request.
Optional
maxDetermines the behavior when a request fails because the underlying
connection to the server could not be opened
(e.g. ECONNREFUSED
in Node.js):
false
: the request fails immediately.
0
: the request is retried until a server can be reached but only a
total number of times matching the number of known servers (including
the initial failed request).
any other number: the request is retried until a server can be reached
or the request has been retried a total of maxRetries
number of times
(not including the initial failed request).
When working with a single server, the retries (if any) will be made to the same server.
This setting currently has no effect when using arangojs in a browser.
Note: Requests bound to a specific server (e.g. fetching query results) will never be retried automatically and ignore this setting.
Note: To set the number of retries when a write-write conflict is
encountered, see retryOnConflict
instead.
Default: 0
Optional
retryIf set to a positive number, requests will automatically be retried at most this many times if they result in a write-write conflict.
Default: 0
Optional
timeout?: numberTime in milliseconds after which arangojs will abort the request if the socket has not already timed out.
Options that can be shared globally for all requests made with arangojs.