Type Alias HttpClientResponse<T, HeaderParamsObject>

HttpClientResponse: {
    body: T;
    headers: HeaderParamsObject;
    rawBody: unknown;
    status: HttpStatus;
    statusText: string;
}

Definition for a response from using the http client.

Type Parameters

  • T = undefined
  • HeaderParamsObject extends Record<string, unknown> = Partial<Record<KnownHeader, string | undefined>>

Type declaration

  • body: T

    The parsed and validated response body.

    When no responseBody definition has been provided by the request than this is undefined.

  • headers: HeaderParamsObject

    The headers of the response.

  • rawBody: unknown

    The raw body of the response. No parsing or validation has happened here.

  • status: HttpStatus

    The http status of the response.

  • statusText: string

    The http status text of the response.