Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more
Object
Parent of HTTPRequest class. Do not use this directly; use a subclass of HTTPRequest.
Mixes in the HTTPHeader module.
# File net/http.rb, line 1474 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
# File net/http.rb, line 1508 def body=(str) @body = str @body_stream = nil str end
# File net/http.rb, line 1501 def body_exist? warn "Net::HTTPRequest#body_exist? is obsolete; use response_body_permitted?" if $VERBOSE response_body_permitted? end
# File net/http.rb, line 1516 def body_stream=(input) @body = nil @body_stream = input input end
# File net/http.rb, line 1489 def inspect "\#<#{self.class} #{@method}>" end