[]previous and next page

html

An HTML response (text/html; charset=utf-8).

An HTML response (text/html; charset=utf-8). The caller is responsible for escaping.

Import#

ts
import { html } from "@shadow-js/dusk/server";

Signature#

ts
function html(body: string, init: ResponseInit = {}): Response

Parameters#

Name Description
body Trusted markup.
init Status and headers.

Returns#

The response.

Examples#

ts
export const GET = () => html("<h1>Hello</h1>");