Interface Configuration

Hierarchy

  • Configuration

Properties

agent?: unknown

Pass your own http agent to support proxies.

baseUrl: string
fetch?: FetchAPI

Provide your own fetch implementation.

headers?: HTTPHeaders

Custom headers that will be added to every request.

middleware?: Middleware[]

Provide a middleware that will run either before the request, after the request or when the request fails.

parseError: ((response) => Promise<Error>)

Type declaration

    • (response): Promise<Error>
    • Parameters

      • response: Response

      Returns Promise<Error>

Retry configuration.

timeoutDuration?: number

Timeout in ms before aborting the request (default 10,000)