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

    Class JsonResponse<T, A>

    An HTTP response with a plain text body.

    Type Parameters

    • T
    • A

    Hierarchy (View Summary)

    Index

    Constructors

    • Construct a new JsonResponse.

      Type Parameters

      • T
      • A

      Parameters

      • json: T

        The JSON data to send in the response body.

      • OptionalstatusCode: number = 200

        The HTTP response status code to send.

      • Optionalheaders: HeadersInit

        The HTTP response headers to send.

      Returns JsonResponse<T, 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