Interface HttpResponse<TPathParams, TQueryParams, TRequestBody, TResponseBody>

HTTP response structure.

interface HttpResponse<TPathParams, TQueryParams, TRequestBody, TResponseBody> {
    attempts?: number;
    axiosConfig: AxiosRequestConfig<any>;
    data: TResponseBody;
    duration: number;
    headers: Headers;
    originalRequestProps: MakeHttpRequestProps<TPathParams, TQueryParams, TRequestBody, TResponseBody>;
    requestProps: RefinedRequestProps<TPathParams, TQueryParams, TRequestBody>;
    status: number;
    statusText: string;
    success: boolean;
    url: string;
}

Type Parameters

  • TPathParams = PathParams

    Type of the path parameters.

  • TQueryParams = QueryParams

    Type of the query parameters.

  • TRequestBody = any

    Type of the request body.

  • TResponseBody = any

    Type of the response body.

Properties

attempts?: number

The number of retry attempts made. Optional.

axiosConfig: AxiosRequestConfig<any>

The Axios configuration used for the request.

The response body data.

duration: number

The duration of the request in milliseconds.

headers: Headers

The headers included in the response.

The original request properties before any refinement.

The refined request properties, including resolved path and query parameters.

status: number

The HTTP status code of the response.

statusText: string

The status text corresponding to the HTTP status code.

success: boolean

Indicates whether the request was successful.

url: string

The URL of the request.