tesla v1.3.2 Tesla.Middleware.Timeout View Source

Timeout http request after X milliseconds.

Example

defmodule MyClient do
  use Tesla

  plug Tesla.Middleware.Timeout, timeout: 2_000
end

Options

  • :timeout - number of milliseconds a request is allowed to take (defaults to 1000)