Interface ClientRequest<Req>

Represents a client for making requests to a service provider.

The type of the response payload.

interface ClientRequest<Req> {
    body?: Req;
    contentType?: string;
    headers?: Record<string, any>;
    method: "GET" | "POST";
    originMethod?: string;
    overrides?: ClientHeadersType & {
        API_KEY?: string;
        WITH_CREDENTIALS?: boolean;
    } & {
        AUTH_TOKEN?: string;
    };
    params?: any;
    url: string;
}

Type Parameters

  • Req

    The type of the request payload.

Properties

body?: Req
contentType?: string
headers?: Record<string, any>
method: "GET" | "POST"
originMethod?: string
overrides?: ClientHeadersType & {
    API_KEY?: string;
    WITH_CREDENTIALS?: boolean;
} & {
    AUTH_TOKEN?: string;
}
params?: any
url: string