Class: Spec::Client::Http::Request
- Inherits:
-
Object
- Object
- Spec::Client::Http::Request
- Defined in:
- lib/spec/client/http/request.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#params ⇒ Object
Returns the value of attribute params.
-
#request_method ⇒ Object
Returns the value of attribute request_method.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #driver_execute(url, request_method, headers, params) ⇒ Object
- #execute ⇒ Object
-
#initialize(url, request_method, params, headers, driver = Driver::CurlDriver.new) ⇒ Request
constructor
A new instance of Request.
- #url_encoded_params ⇒ Object
Constructor Details
#initialize(url, request_method, params, headers, driver = Driver::CurlDriver.new) ⇒ Request
Returns a new instance of Request.
10 11 12 |
# File 'lib/spec/client/http/request.rb', line 10 def initialize(url, request_method, params, headers, driver=Driver::CurlDriver.new) @url, @request_method, @params, @headers, @driver = url, request_method, params, headers, driver end |
Instance Attribute Details
#headers ⇒ Object
Returns the value of attribute headers.
8 9 10 |
# File 'lib/spec/client/http/request.rb', line 8 def headers @headers end |
#params ⇒ Object
Returns the value of attribute params.
8 9 10 |
# File 'lib/spec/client/http/request.rb', line 8 def params @params end |
#request_method ⇒ Object
Returns the value of attribute request_method.
8 9 10 |
# File 'lib/spec/client/http/request.rb', line 8 def request_method @request_method end |
#url ⇒ Object
Returns the value of attribute url.
8 9 10 |
# File 'lib/spec/client/http/request.rb', line 8 def url @url end |
Instance Method Details
#driver_execute(url, request_method, headers, params) ⇒ Object
22 23 24 |
# File 'lib/spec/client/http/request.rb', line 22 def driver_execute(url,request_method,headers,params) @driver.execute(url,request_method,headers,params) end |
#execute ⇒ Object
18 19 20 |
# File 'lib/spec/client/http/request.rb', line 18 def execute driver_execute(url,request_method,headers,params) end |
#url_encoded_params ⇒ Object
14 15 16 |
# File 'lib/spec/client/http/request.rb', line 14 def url_encoded_params @driver.url_encode_params(params) end |