Finch.stream
You're seeing just the function
stream
, go back to Finch module for more information.
Specs
stream(Finch.Request.t(), name(), acc, stream(acc), keyword()) :: {:ok, acc} | {:error, Exception.t()} when acc: term()
Streams an HTTP request and returns the accumulator.
A function of arity 2 is expected as argument. The first argument is a tuple, as listed below, and the second argument is the accumulator. The function must return a potentially updated accumulator.
Stream commands
{:status, status}
- the status of the http response{:headers, headers}
- the headers of the http response{:data, data}
- a streaming section of the http body
Options
:pool_timeout
- This timeout is applied when we check out a connection from the pool. Default value is5_000
.:receive_timeout
- The maximum time to wait for a response before returning an error. Default value is15_000
.