Type alias RequestOptions

RequestOptions: {
    allowDirtyRead?: boolean;
    basePath?: string;
    body?: any;
    expectBinary?: boolean;
    headers?: Headers | Record<string, string>;
    isBinary?: boolean;
    method?: string;
    path?: string;
    retryOnConflict?: number;
    search?: URLSearchParams | Record<string, any>;
    timeout?: number;
}

Options for performing a request with arangojs.

Type declaration

  • Optional allowDirtyRead?: boolean

    Whether ArangoDB is allowed to perform a dirty read to respond to this request. If set to true, the response may reflect a dirty state from a non-authoritative server.

  • Optional basePath?: string

    Optional prefix path to prepend to the path.

  • Optional body?: any

    Request body data.

  • Optional expectBinary?: boolean

    If set to true, the response body will not be interpreted as JSON and instead passed as-is.

  • Optional headers?: Headers | Record<string, string>

    HTTP headers to pass along with this request in addition to the default headers generated by arangojs.

  • Optional isBinary?: boolean

    If set to true, the request body will not be converted to JSON and instead passed as-is.

  • Optional method?: string

    HTTP method to use in order to perform the request.

    Default: "GET"

  • Optional path?: string

    URL path, relative to the basePath and server domain.

  • Optional retryOnConflict?: number

    If set to a positive number, the request will automatically be retried at most this many times if it results in a write-write conflict.

    Default: config.retryOnConflict

  • Optional search?: URLSearchParams | Record<string, any>

    URL parameters to pass as part of the query string.

  • Optional timeout?: number

    Time in milliseconds after which arangojs will abort the request if the socket has not already timed out.

    See also agentOptions.timeout in Config.