Class: Riddl::Client::HTTPRequest
- Inherits:
-
Net::HTTPGenericRequest
- Object
- Net::HTTPGenericRequest
- Riddl::Client::HTTPRequest
- Defined in:
- lib/ruby/riddl/client.rb
Overview
}}}
Instance Method Summary collapse
-
#initialize(method, path, parameters, headers, qs) ⇒ HTTPRequest
constructor
{{{.
- #simulate ⇒ Object
- #supply_default_content_type ⇒ Object
Constructor Details
#initialize(method, path, parameters, headers, qs) ⇒ HTTPRequest
{{{
467 468 469 470 471 472 473 474 |
# File 'lib/ruby/riddl/client.rb', line 467 def initialize(method, path, parameters, headers, qs) path = (path.strip == '' ? '/' : path) path += "?#{qs}" unless qs == '' super method, true, true, path, headers tmp = Protocols::HTTP::Generator.new(parameters,self).generate(:input) self.content_length = tmp.size self.body_stream = tmp end |
Instance Method Details
#simulate ⇒ Object
480 481 482 483 484 485 |
# File 'lib/ruby/riddl/client.rb', line 480 def simulate sock = StringIO.new('') self.exec(sock,"1.1",self.path) sock.rewind [nil, sock, []] end |
#supply_default_content_type ⇒ Object
476 477 478 |
# File 'lib/ruby/riddl/client.rb', line 476 def supply_default_content_type ### none, Protocols::HTTP::Generator handles this end |