Flexirest: Per-request timeouts

March 19, 2018 ยท View on GitHub

There are times when an API is generally quick, but one call is very intensive. You don't want to set a global timeout in the Faraday configuration block, you just want to increase the timeout for this single call. To do this, you can simply pass a timeout option when mapping the call containing the response (in seconds).

class Person < Flexirest::Base
  get :all, '/people', timeout: 5
end

< Faking calls | Per-request parameter encoding >