Function createWebResponse
- createWebResponse(
body:
| undefined
| string
| Blob
| ArrayBuffer
| ReadableStream<Uint8Array<ArrayBufferLike>>,
options?: {
headers?: Record<string, string> | [string, string][] | Headers;
status?: HTTPStatusCode;
},
): WebResponseParameters
- body:
| undefined
| string
| Blob
| ArrayBuffer
| ReadableStream<Uint8Array<ArrayBufferLike>>The body to return.
Optional
options: {
headers?: Record<string, string> | [string, string][] | Headers;
status?: HTTPStatusCode;
}Optional statuscode and headers
Returns WebResponse
- body:
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