[Web]Response[Web]Response — the response handlers build: an [HTTP]ServerResponse with the builder conveniences. The threading setters (status:, header:value:, contentType:, body:) are inherited from the transport class, so a builder result chains further:
[Web]Response.json:user status:201 ([Web]Response.text:'hi').header:'X-Trace' value:tid
A 200 application/octet-stream response with raw Bytes b.
A 200 text/html (UTF-8) response with body s.
A 200 application/json response: v is JSON-generated into the body.
([Web]Response.json:#{'ok':true}).body.asString "* -> {"ok":true}
A JSON response with an explicit status (e.g. 201 for a create).
A 204 No Content response.
A 302 Found redirect to loc.
([Web]Response.redirect:'/login').headers "* -> #(#(Location /login))
A redirect with an explicit 3xx status (301 / 303 / 307 / 308).
A bare response carrying just a status, no body.
A streaming (chunked) response; each Generator yield is one chunk on the wire. The default content type fits server-sent events.
A streaming (chunked) response with an explicit content type; each Generator yield is one chunk on the wire.
A 200 text/plain (UTF-8) response with body s.
([Web]Response.text:'hi').headers "* -> #(#(Content-Type text/plain; charset=utf-8))
Defaults for the bare-.new construction the builders use (guarded, so a config-block construction that already set them wins).