createWebResponse | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function createWebResponse

    • Create a webresponse

      If a body is set but no content-type header is explicitly added, the content-type will be set to text/html; charset=utf-8

      Parameters

      • body:
            | undefined
            | string
            | Blob
            | ArrayBuffer
            | ReadableStream<Uint8Array<ArrayBufferLike>>

        The body to return.

      • Optionaloptions: {
            headers?: Record<string, string> | [string, string][] | Headers;
            status?: HTTPStatusCode;
        }

        Optional statuscode and headers

      Returns WebResponse