Class: Net::HTTPRequest

Inherits:
HTTPGenericRequest show all
Defined in:
lib/net/http.rb

Overview

HTTP request class. This class wraps request header and entity path. You must use its subclass, Net::HTTP::Get, Post, Head.

Constant Summary

Constants inherited from HTTPGenericRequest

Net::HTTPGenericRequest::BUFSIZE

Instance Attribute Summary

Attributes inherited from HTTPGenericRequest

#body, #body_stream, #method, #path

Instance Method Summary collapse

Methods inherited from HTTPGenericRequest

#body_exist?, #exec, #inspect, #request_body_permitted?, #response_body_permitted?, #set_body_internal

Methods included from HTTPHeader

#[], #[]=, #add_field, #basic_auth, #chunked?, #content_length, #content_length=, #content_range, #content_type, #delete, #each_capitalized, #each_capitalized_name, #each_header, #each_name, #each_value, #fetch, #get_fields, #initialize_http_header, #key?, #main_type, #proxy_basic_auth, #range, #range_length, #set_content_type, #set_form_data, #set_range, #size, #sub_type, #to_hash, #type_params

Constructor Details

#initialize(path, initheader = nil) ⇒ HTTPRequest

Creates HTTP request object.


1595
1596
1597
1598
1599
1600
# File 'lib/net/http.rb', line 1595

def initialize(path, initheader = nil)
  super self.class::METHOD,
        self.class::REQUEST_HAS_BODY,
        self.class::RESPONSE_HAS_BODY,
        path, initheader
end