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



416
417
418
419
420
421
422
423
# File 'lib/kronk/request.rb', line 416

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