Type alias RequestOptions

RequestOptions: CommonRequestOptions & {
    body?: any;
    expectBinary?: boolean;
    fetchOptions?: Omit<FetchOptions, "headers">;
    headers?: string[][] | Record<string, string | ReadonlyArray<string>> | Headers;
    isBinary?: boolean;
    method?: string;
    pathname?: string;
    search?: URLSearchParams | Record<string, any>;
}

Options for performing a request with arangojs.

Type declaration

  • 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 fetchOptions?: Omit<FetchOptions, "headers">

    Additional options to pass to the fetch function.

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

    Headers object containing any additional headers to send with the request.

    Note that the Authorization header will be overridden if the auth configuration option is set.

  • 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 pathname?: string

    URL path, relative to the server domain.

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

    URL parameters to pass as part of the query string.