Class: HttpUtilities::Http::Request
- Inherits:
-
Object
- Object
- HttpUtilities::Http::Request
- Includes:
- Logger, ProxySupport, UserAgent
- Defined in:
- lib/http_utilities/http/request.rb
Constant Summary
Constants included from UserAgent
Instance Attribute Summary collapse
-
#interface ⇒ Object
Returns the value of attribute interface.
-
#proxy ⇒ Object
Returns the value of attribute proxy.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
Instance Method Summary collapse
-
#initialize(interface: nil, proxy: {}, options: {}) ⇒ Request
constructor
A new instance of Request.
Methods included from UserAgent
Methods included from ProxySupport
#generate_proxy_options, #proxy_model_defined?, #set_proxy_credentials, #set_proxy_options
Methods included from Logger
Constructor Details
#initialize(interface: nil, proxy: {}, options: {}) ⇒ Request
Returns a new instance of Request.
10 11 12 13 14 15 |
# File 'lib/http_utilities/http/request.rb', line 10 def initialize(interface: nil, proxy: {}, options: {}) self.interface = interface self.proxy = proxy self.set_user_agent(device: .fetch(:user_agent_device, :desktop)) end |
Instance Attribute Details
#interface ⇒ Object
Returns the value of attribute interface.
8 9 10 |
# File 'lib/http_utilities/http/request.rb', line 8 def interface @interface end |
#proxy ⇒ Object
Returns the value of attribute proxy.
8 9 10 |
# File 'lib/http_utilities/http/request.rb', line 8 def proxy @proxy end |
#user_agent ⇒ Object
Returns the value of attribute user_agent.
8 9 10 |
# File 'lib/http_utilities/http/request.rb', line 8 def user_agent @user_agent end |