Class Client<UserContext>

Type Parameters

  • UserContext extends object = object

Hierarchy

  • Client

    Constructors

    Properties

    Shares information and functionality between middlewares. For example, the default middleware execution context always includes a Pino logger instance.

    credentials?: CredentialProvider

    Expose the credential provider as readonly so developers can interact with it.

    logger: Logger

    A logger library compatible with Pino for logging in middleware layers.

    Expose the middleware stack as readonly so developers can add additional middleware for a specific client.

    prefix: string

    Expose the prefix for other extensions to match with.

    Methods

    • fetch is a wrapper around the send method, instantiating a FetchCommand and then invoking the send method.

      Parameters

      • url: string | Request | URL
      • Optional options: RequestInit

      Returns Promise<Response>

    • A convenience accessor for obtaining the issuer URL from an oauth credential provider. The accessor will throw without properly instantiating an oauth credential provider.

      Returns Promise<URL>

    • A function that ends the middleware callback chain by executing fetch request and returning the response.

      between middlewares.

      Parameters

      • this: undefined

      Returns FinalizeHandler<object, object>

      A fetch Response object.