class Riddl::Client::SimulateRequest
Public Class Methods
Source
# File lib/ruby/riddl/client.rb, line 425 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
Calls superclass method
Public Instance Methods
Source
# File lib/ruby/riddl/client.rb, line 438 def simulate sock = StringIO.new('') sock.define_singleton_method(:io) do sock end self.exec(sock,"1.1",self.path) sock.rewind [nil, sock, []] end
Source
# File lib/ruby/riddl/client.rb, line 434 def supply_default_content_type ### none, Protocols::HTTP::Generator handles this end