Class Net::HTTPGenericRequest
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.

Methods

Included Modules

HTTPHeader

Attributes

body  [R] 
body_stream  [R] 
method  [R] 
path  [R] 

Public Class methods

[Source]

# File net/http.rb, line 1475
    def initialize(m, reqbody, resbody, path, initheader = nil)
      @method = m
      @request_has_body = reqbody
      @response_has_body = resbody
      raise ArgumentError, "HTTP request path is empty" if path.empty?
      @path = path
      initialize_http_header initheader
      self['Accept'] ||= '*/*'
      @body = nil
      @body_stream = nil
    end

Public Instance methods

[Source]

# File net/http.rb, line 1509
    def body=(str)
      @body = str
      @body_stream = nil
      str
    end

[Source]

# File net/http.rb, line 1502
    def body_exist?
      warn "Net::HTTPRequest#body_exist? is obsolete; use response_body_permitted?" if $VERBOSE
      response_body_permitted?
    end

[Source]

# File net/http.rb, line 1517
    def body_stream=(input)
      @body = nil
      @body_stream = input
      input
    end

[Source]

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

[Source]

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

[Source]

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

[Validate]

ruby-doc.org is a community service provided by Happy Camper Studios, a Phoenix, Arizona, Ruby application development company.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.