Mayson Monorepo Documentation
    Preparing search index...

    Interface HttpClient<ResponseType>

    Encapsulates the logic for issuing a request to the Stripe API. This is an experimental interface and is not yet stable.

    interface HttpClient<
        ResponseType extends HttpClientResponse = HttpClientResponse,
    > {
        getClientName(): string;
        makeRequest(
            host: string,
            port: string | number,
            path: string,
            method: "POST" | "GET" | "PUT" | "DELETE",
            headers: object,
            requestData: string,
            protocol: HttpProtocol,
            timeout: number,
        ): Promise<ResponseType>;
    }

    Type Parameters

    Index

    Methods

    • The client name to use for diagnostics.

      Returns string

    • Parameters

      • host: string
      • port: string | number
      • path: string
      • method: "POST" | "GET" | "PUT" | "DELETE"
      • headers: object
      • requestData: string
      • protocol: HttpProtocol
      • timeout: number

      Returns Promise<ResponseType>