Finch.stream

You're seeing just the function stream, go back to Finch module for more information.
Link to this function

stream(req, name, acc, fun, opts \\ [])

View Source

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 is 5_000.

  • :receive_timeout - The maximum time to wait for a response before returning an error. Default value is 15_000.