Http module

Client_Response

structSource

A response: the status and headers, and the body still waiting on its connection. close releases it.

A call that got no response at all (the connection failed, a timeout) still returns one beside its error: status is 0, reason says what went wrong and there is no body, so code that only keeps the response can still name the request.

Copies of a response share one body: reading it through any copy reads it for all.

Fields

status: int
reason: string
headers: [] Header_Field
method: Method
The request this answers, as it was given: the method, the URL (possibly relative) and the first bytes of its body (request_body_size is the full size).
url: string
request_body: string
request_body_size: int
storage: *void
source: *Body_Source

See also