Module: HTTPX::Plugins::OAuth::OAuthRetries
- Defined in:
- lib/httpx/plugins/oauth.rb
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
Class Method Details
.extra_options(options) ⇒ Object
262 263 264 265 266 267 |
# File 'lib/httpx/plugins/oauth.rb', line 262 def () .merge( retry_on: method(:response_oauth_error?), generate_auth_value_on_retry: method(:response_oauth_error?) ) end |
.response_oauth_error?(res) ⇒ Boolean
269 270 271 |
# File 'lib/httpx/plugins/oauth.rb', line 269 def response_oauth_error?(res) res.is_a?(Response) && res.status == 401 end |