Plain text with Content-Type: text/plain; charset=utf-8.
- body: sent as it is.
- status: the HTTP status code.
response := text("not here", 404);
assert(response.status == 404);
assert(string.{ response.body.count, response.body.data } == "not here");Doesn't run in the browser (skipped on wasm).
text :: (body: string, status := 200) -> Response
Plain text with Content-Type: text/plain; charset=utf-8.
Parameters
- body: string
- sent as it is.
- status := 200
- the HTTP status code.
Returns
response := text("not here", 404);
assert(response.status == 404);
assert(string.{ response.body.count, response.body.data } == "not here");Doesn't run in the browser (skipped on wasm).