tesla v0.10.0 Tesla.Middleware.Timeout View Source

Timeout http request after X seconds.

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)

Link to this section Summary

Link to this section Functions

Callback implementation for Tesla.Middleware.call/3.