createHtmlResponse

View Source

Summary

Creates an HTML Response that ensures the response has a valid DOCTYPE and appropriate Content-Type header.

Signature

function createHtmlResponse(body: HtmlBody, init: ResponseInit): Response;

Params

body

The body of the response

init

The ResponseInit object for the response

Returns

A Response object with a HTML body and the appropriate Content-Type header