3 Responses
class | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
|
A Response may still be in the process of receiving its data when it is returned, so methods like Response.body may block while data is read. A Response is Closeable via Response.close.
As a binding form, Response extracts and sometimes converts response information, blocking as needed until the information is available. The extracted information is matched against a given binding.
~status_line: Matches the same byte string result as produced by Response.status_line.
~status_code: Matches the same integer result as produced by Response.status_code.
~status_message: Matches the same byte string result as produced by Response.status_message.
~http_version: Matches the same byte string result as produced by Response.http_version.
~history: Matches the list result as produced by Response.history.
~headers: Matches against indivdual fields in a response header. These fields are located in the byte strings returned by Response.raw_headers, where key_strs are matched case-insensitively to field name, and each bstr_bind after a key_str is matched against the byte-string value of that field. If & bstr_list_bind is present, it is matched against the list of byte strings from Response.raw_headers, but with lines matched to key_strs removed.
~body: Matches the byte string result as produced by Response.body.
property | |
| |
property | |
| |
| |
property | |
| |
property | |
| |
property | |
method | |
| |
method | |
If Response.output is called after Response.body, then the returned output port will be closed. If ~stream: #false or ~close: #true were provided to Session.request to obtain the Response object, then Response.body is effectively called already.
The Response.drain method reads all data for the response body and records it. A Response.drain call has no effect if the content is already read.
annotation | |
context parameter | |