Class: Typhoid::Request
- Inherits:
-
TyphoeusDecorator
- Object
- TyphoeusDecorator
- Typhoid::Request
- Defined in:
- lib/typhoid/request.rb
Constant Summary collapse
- ACCESSOR_OPTIONS =
[ :method, :params, :body, :headers, :cache_key_basis, :connect_timeout, :timeout, :user_agent, :response, :cache_timeout, :follow_location, :max_redirects, :proxy, :proxy_username, :proxy_password, :disable_ssl_peer_verification, :disable_ssl_host_verification, :interface, :ssl_cert, :ssl_cert_type, :ssl_key, :ssl_key_type, :ssl_key_password, :ssl_cacert, :ssl_capath, :ssl_version, :verbose, :username, :password, :auth_method, :proxy_auth_method, :proxy_type ]
Instance Attribute Summary
Attributes inherited from TyphoeusDecorator
Instance Method Summary collapse
-
#method ⇒ Object
Need to force override, because Object#method.
- #options ⇒ Object
- #response ⇒ Object
- #run ⇒ Object
Methods inherited from TyphoeusDecorator
#==, #compat, decorate, #initialize, #inspect, inspect, #instance_of?, #kind_of?, method_missing, #method_missing, new, respond_to?, #respond_to?, source_klass
Constructor Details
This class inherits a constructor from Typhoid::TyphoeusDecorator
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Typhoid::TyphoeusDecorator
Instance Method Details
#method ⇒ Object
Need to force override, because Object#method
57 58 59 |
# File 'lib/typhoid/request.rb', line 57 def method source.respond_to?(:method) && source.method || [:method] || :get end |
#options ⇒ Object
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/typhoid/request.rb', line 61 def if source.respond_to?(:options) source. else ACCESSOR_OPTIONS.reduce({}) do |hash, key| hash[key] = source.send(key) if source.respond_to?(:key) hash end end end |
#response ⇒ Object
52 53 54 |
# File 'lib/typhoid/request.rb', line 52 def response compat [:handled_response, :response] end |