Constructors

Properties

Methods

Constructors

Properties

body: string
cookies: Record<string, string>
headers: IncomingHttpHeaders
ok: boolean
status: number
url: string

Methods

  • Returns the body of the response as a JSON object.

    Type Parameters

    • T extends unknown

    Returns Promise<T>

    A promise that resolves with the body of the response as a JSON object.

    Typeparam

    T - The type of the JSON object.

  • Returns the body of the response as a string.

    Returns Promise<string>

    A promise that resolves with the body of the response as a string.