Class: Kronk::Request::VanillaRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/kronk/request.rb

Overview

Allow any http method to be sent

Class Method Summary collapse

Class Method Details

.new(method, path, initheader = nil) ⇒ Object



620
621
622
623
624
625
626
627
# File 'lib/kronk/request.rb', line 620

def self.new method, path, initheader=nil
  klass = Class.new Net::HTTPRequest
  klass.const_set "METHOD", method.to_s.upcase
  klass.const_set "REQUEST_HAS_BODY", true
  klass.const_set "RESPONSE_HAS_BODY", true

  klass.new path, initheader
end