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

    Class TextResponse<A>

    An HTTP response with a plain text body.

    Type Parameters

    • A

    Hierarchy (View Summary)

    Index

    Constructors

    • Construct a new TextResponse.

      Type Parameters

      • A

      Parameters

      • text: string

        The plain text body of the response.

      • OptionalstatusCode: number = 200

        The HTTP response status code to send.

      • Optionalheaders: HeadersInit

        The HTTP response headers to send.

      Returns TextResponse<A>

    Properties

    buffer: Uint8Array

    Fetch the buffer to send in the response body.

    headers: Headers

    The HTTP response headers to send.

    statusCode: number

    The HTTP response status code to send.

    Methods