Class: HttpUtilities::Http::Request

Inherits:
Object
  • Object
show all
Includes:
Logger, ProxySupport, UserAgent
Defined in:
lib/http_utilities/http/request.rb

Constant Summary

Constants included from UserAgent

UserAgent::USER_AGENTS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from UserAgent

#set_user_agent

Methods included from ProxySupport

#proxy_model_defined?, #set_proxy_credentials, #set_proxy_options, #using_proxy?

Methods included from Logger

#log

Constructor Details

#initialize(interface = nil, proxy = {}, cookies = []) ⇒ Request

Returns a new instance of Request.



10
11
12
13
14
15
16
# File 'lib/http_utilities/http/request.rb', line 10

def initialize(interface = nil, proxy = {}, cookies = [])
  self.interface  =   interface
  self.proxy      =   proxy
  self.cookies    =   cookies
  
  self.set_user_agent
end

Instance Attribute Details

#cookies ⇒ Object

Returns the value of attribute cookies.



8
9
10
# File 'lib/http_utilities/http/request.rb', line 8

def cookies
  @cookies
end

#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