HTML with Content-Type: text/html; charset=utf-8.
- body: sent as it is. Nothing is escaped.
- status: the HTTP status code.
response := html("<h1>Hello</h1>");
type, _ := find_header(response.headers, "Content-Type");
assert(type == "text/html; charset=utf-8");Doesn't run in the browser (skipped on wasm).
html :: (body: string, status := 200) -> Response
HTML with Content-Type: text/html; charset=utf-8.
Parameters
- body: string
- sent as it is. Nothing is escaped.
- status := 200
- the HTTP status code.
Returns
response := html("<h1>Hello</h1>");
type, _ := find_header(response.headers, "Content-Type");
assert(type == "text/html; charset=utf-8");Doesn't run in the browser (skipped on wasm).