Class: DHC::DefaultTimeout
- Inherits:
-
Interceptor
- Object
- Interceptor
- DHC::DefaultTimeout
- Includes:
- ActiveSupport::Configurable
- Defined in:
- lib/dhc/interceptors/default_timeout.rb
Constant Summary collapse
- CONNECTTIMEOUT =
seconds
2
- TIMEOUT =
seconds
15
Instance Attribute Summary
Attributes inherited from Interceptor
Instance Method Summary collapse
Methods inherited from Interceptor
#after_request, #after_response, #all_interceptor_classes, #before_request, #before_response, dup, #initialize, #response
Constructor Details
This class inherits a constructor from DHC::Interceptor
Instance Method Details
#before_init ⇒ Object
11 12 13 14 15 |
# File 'lib/dhc/interceptors/default_timeout.rb', line 11 def before_init = request. || {} [:timeout] ||= timeout || TIMEOUT [:connecttimeout] ||= connecttimeout || CONNECTTIMEOUT end |