Interface Client

interface Client {
    binaryProvider?: <Req>(
        requestOptions: ClientRequest<Req>,
    ) => Promise<ClientResponse<Buffer<ArrayBufferLike>>>;
    provider<Req, Res>(
        requestOptions: ClientRequest<Req>,
    ): Promise<ClientResponse<Res>>;
}

Methods

Properties

Methods

  • Sends a request to the specified URL with the given options.

    Type Parameters

    • Req
    • Res

    Parameters

    • requestOptions: ClientRequest<Req>

      The options for the request.

      Represents a client for making requests to a service provider.

      • OptionalacceptType?: string
      • Optionalbody?: Req
      • OptionalcontentType?: string
      • Optionalheaders?: Record<string, any>
      • method: "GET" | "POST"
      • OptionaloriginMethod?: string
      • Optionaloverrides?: ClientHeadersType & { API_KEY?: string; WITH_CREDENTIALS?: boolean } & {
            AUTH_TOKEN?: string;
        }
      • Optionalparams?: any
      • url: string

    Returns Promise<ClientResponse<Res>>

Properties

binaryProvider?: <Req>(
    requestOptions: ClientRequest<Req>,
) => Promise<ClientResponse<Buffer<ArrayBufferLike>>>

Sends a request to the specified URL with the given options, that returns a binary response

Type declaration

    • <Req>(
          requestOptions: ClientRequest<Req>,
      ): Promise<ClientResponse<Buffer<ArrayBufferLike>>>
    • Type Parameters

      • Req

      Parameters

      • requestOptions: ClientRequest<Req>

        The options for the request.

        Represents a client for making requests to a service provider.

        • OptionalacceptType?: string
        • Optionalbody?: Req
        • OptionalcontentType?: string
        • Optionalheaders?: Record<string, any>
        • method: "GET" | "POST"
        • OptionaloriginMethod?: string
        • Optionaloverrides?: ClientHeadersType & { API_KEY?: string; WITH_CREDENTIALS?: boolean } & {
              AUTH_TOKEN?: string;
          }
        • Optionalparams?: any
        • url: string

      Returns Promise<ClientResponse<Buffer<ArrayBufferLike>>>

MMNEPVFCICPMFPCPTTAAATR