Parse a status line: "HTTP/x.y code reason". Returns (HttpVersion, Status) or throws on malformed input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Receive and parse a complete HTTP/1.1 response from a connection.
Handles three body-reading strategies:
- Content-Length: read exactly that many bytes
- Transfer-Encoding: chunked: decode chunked encoding
- Neither: read until connection close
$$\text{receiveResponse} : \text{Connection} \to \text{IO Response}$$
Equations
- One or more equations did not get rendered due to their size.
Instances For
Perform an HTTP request on a connection: send request, receive response. $$\text{performRequest} : \text{Connection} \to \text{Request} \to \text{IO Response}$$
Equations
- Network.HTTP.Client.performRequest conn req = do Network.HTTP.Client.sendRequest conn req Network.HTTP.Client.receiveResponse conn