Type alias XhrOptions

XhrOptions: {
    beforeSend?: ((xhrObject: any) => void);
    maxSockets?: number;
    timeout?: number;
    useXdr?: boolean;
    withCredentials?: boolean;
    xhr?: any;
}

Options of the xhr module that can be set using agentOptions when using arangojs in the browser. Additionally maxSockets can be used to control the maximum number of parallel requests.

See also: xhr on npm.

Type declaration

  • Optional beforeSend?: ((xhrObject: any) => void)
      • (xhrObject: any): void
      • Callback that will be invoked immediately before the send method of the request is called.

        See also RequestInterceptors.

        Parameters

        • xhrObject: any

        Returns void

  • Optional maxSockets?: number

    Maximum number of parallel requests arangojs will perform. If any additional requests are attempted, they will be enqueued until one of the active requests has completed.

  • Optional timeout?: number

    Number of milliseconds to wait for a response.

    Default: 0 (disabled)

  • Optional useXdr?: boolean

    (Internet Explorer 10 and lower only.) Whether XDomainRequest should be used instead of XMLHttpRequest. Only required for performing cross-domain requests in older versions of Internet Explorer.

  • Optional withCredentials?: boolean

    Specifies whether browser credentials (e.g. cookies) should be sent if performing a cross-domain request.

    See XMLHttpRequest.withCredentials.

  • Optional xhr?: any

    XMLHttpRequest object to use instead of the native implementation.

Generated using TypeDoc