HTTPStream.Adapter behaviour (HTTPStream v1.0.0) View Source
Adapter behaviour for HTTPStream compatible clients.
An adapter must implement the following callbacks:
request/1
- Receives anHTTPStream.Request.t()
and initiates the HTTP connection to the endpoint.parse_chunks/1
- Receives values of any type returned byrequest/1
and reads a chunk of data from the connection.close/1
- Called when the final value fromparse_chunks/1
is read. Should close the connection.
Currently supported adapters: HTTPStream.Adapter.Mint