Sends request and returns once the status line and headers have arrived. The response is
whatever the server answered (a 404 is a response, not an error); the body is read from it with
read_text, read_bytes, read_json or read_some. Errors are only about not getting a
response: the URL, the connection, a timeout, a reply that is not HTTP, too many redirects.
send :: (
client: *Client,
request: Client_Request
) -> (Client_Response, Client_Error)
Sends request and returns once the status line and headers have arrived. The response is
whatever the server answered (a 404 is a response, not an error); the body is read from it with
read_text, read_bytes, read_json or read_some. Errors are only about not getting a
response: the URL, the connection, a timeout, a reply that is not HTTP, too many redirects.
Parameters
- client: *Client
- request: Client_Request