Http module

Response

structSource

What a handler returns when it wants full control. The headers and body must stay valid until the response is written: use string literals or the temporary allocator (tprint, ,, temp), which the server resets after each response. The builders below do.

Fields

status: := 200
headers: [..] Header_Field
body: [] u8
source: *Response_Source
Set by stream_response and file_response: the body is produced while it is sent.

See also