Represents an outgoing response.

Hierarchy

  • default

Implemented by

Properties

body?: string | Buffer

The response body as a string or a Buffer

getHeader: ((name: string) => unknown)

Type declaration

    • (name: string): unknown
    • Gets the first value of a header

      Returns

      The value of the header

      Parameters

      • name: string

        The name of the header to return

      Returns unknown

getHeaders: (() => ResponseHeaders)

Type declaration

removeHeader: ((name: string) => void)

Type declaration

    • (name: string): void
    • Removes a header

      Parameters

      • name: string

        The header to remove

      Returns void

setHeader: ((name: string, value: unknown) => void)

Type declaration

    • (name: string, value: unknown): void
    • Sets a header

      Parameters

      • name: string

        The name of the header to set

      • value: unknown

        The value to set

      Returns void

statusCode?: number

The HTTP status code

statusMessage?: string

The HTTP status message

Generated using TypeDoc