@cldn/web-ts - v0.4.0
    Preparing search index...

    Class Response<A>Abstract

    An outgoing HTTP response.

    Type Parameters

    • A

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Construct a new Response

      Type Parameters

      • A

      Parameters

      • statusCode: number

        The HTTP response status code to send.

      • Optionalheaders: HeadersInit = {}

        The HTTP response headers to send.

      Returns Response<A>

    Properties

    headers: Headers

    The HTTP response headers to send.

    statusCode: number

    The HTTP response status code to send.

    Methods

    • Set and send the HTTP response status code and headers. No more headers can be sent after this.

      Parameters

      • res: ServerResponse
      • Optionalreq: Request<A>

      Returns void