Package version:

Interface ResponseWithBody<Headers, Body>

An object with a _response property that has body and headers already parsed into known types.

interface ResponseWithBody<Headers, Body> {
    _response: HttpResponse & {
        bodyAsText: string;
        parsedBody: Body;
        parsedHeaders: Headers;
    };
}

Type Parameters

  • Headers
  • Body

Properties

Properties

_response: HttpResponse & {
    bodyAsText: string;
    parsedBody: Body;
    parsedHeaders: Headers;
}

The underlying HTTP response.

Type declaration

  • bodyAsText: string

    The response body as text (string format)

  • parsedBody: Body

    The response body as parsed JSON or XML

  • parsedHeaders: Headers

    The parsed HTTP response headers.