"private/response-structs.ss" provides structures and functions related to HTTP responses.
code : number?
message : string?
seconds : number?
mime : bytes?
A basic HTTP response containing no body. code is the response code, message the message, seconds the generation time, mime the MIME type of the file, and extras are the extra headers, in addition to those produced by the server.
As with response/basic, except with body as the response body.
As with response/basic, except with generator as a function that is called to generate the response body, by being given an output-response function that outputs the content it is called with.
v : any/c
Checks if v is a valid response. A response is either:
A response/basic structure.
A value matching xexpr?.
Equivalent to #"text/html; charset=utf-8".
Warning:If you include a Content-Length header in a response that is inaccurate, there WILL be an error in transmission that the server will not catch.