Net::HTTPGenericRequest (Class)

In: net/http.rb
Parent: Object

Parent of HTTPRequest class. Do not use this directly; use a subclass of HTTPRequest.

Mixes in the HTTPHeader module.

Attributes

method  [R] 
path  [R] 

Included Modules

HTTPHeader

Public Class methods

[Source]

# File net/http.rb, line 1095
    def initialize(m, reqbody, resbody, path, initheader = nil)
      @method = m
      @request_has_body = reqbody
      @response_has_body = resbody
      @path = path

      @header = {}
      return unless initheader
      initheader.each do |k,v|
        key = k.downcase
        $stderr.puts "net/http: warning: duplicated HTTP header: #{k}" if @header.key?(key) and $VERBOSE
        @header[key] = v.strip
      end
      @header['accept'] ||= '*/*'
    end

Public Instance methods

body_exist?()

[Source]

# File net/http.rb, line 1114
    def inspect
      "\#<#{self.class} #{@method}>"
    end

[Source]

# File net/http.rb, line 1118
    def request_body_permitted?
      @request_has_body
    end

[Source]

# File net/http.rb, line 1122
    def response_body_permitted?
      @response_has_body
    end

[Validate]