Type alias RequestInterceptors

RequestInterceptors: {
    after?: ((err: ArangojsError | null, res?: ArangojsResponse) => void);
    before?: ((req: ClientRequest) => void);
}

Additional options for intercepting the request/response. These methods are primarily intended for tracking network related metrics.

Type declaration

  • Optional after?: ((err: ArangojsError | null, res?: ArangojsResponse) => void)
      • (err: ArangojsError | null, res?: ArangojsResponse): void
      • Callback 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.

        Parameters

        • err: ArangojsError | null

          Error encountered when handling this request or null.

        • Optional res: ArangojsResponse

          Response object for this request, if no error occurred.

        Returns void

  • Optional before?: ((req: ClientRequest) => void)
      • (req: ClientRequest): void
      • Callback that will be invoked with the finished request object before it is finalized. In the browser the request may already have been sent.

        Parameters

        • req: ClientRequest

          Request object or XHR instance used for this request.

        Returns void

Generated using TypeDoc