D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Net
/
HTTPGenericRequest
/
Filename :
cdesc-HTTPGenericRequest.ri
back
Copy
U:RDoc::NormalClass[iI"HTTPGenericRequest:ETI"Net::HTTPGenericRequest;TI"Object;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"E\HTTPGenericRequest is the parent of the Net::HTTPRequest class.;To:RDoc::Markup::BlankLine o; ;[I"KDo not use this directly; instead, use a subclass of Net::HTTPRequest.;T@S:RDoc::Markup::Heading: leveli: textI"About the Examples;T@o; ;[I"CExamples here assume that <tt>net/http</tt> has been required ;TI"!(which also requires +uri+):;T@o:RDoc::Markup::Verbatim;[I"require 'net/http' ;T:@format0o; ;[I"8Many code examples here use these example websites:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o; ;[I"*https://jsonplaceholder.typicode.com.;To;;0;[o; ;[I"http://example.com.;T@o; ;[I"/Some examples also assume these variables:;T@o;;[ I"8uri = URI('https://jsonplaceholder.typicode.com/') ;TI"+uri.freeze # Examples may not modify. ;TI"Ahostname = uri.hostname # => "jsonplaceholder.typicode.com" ;TI"&path = uri.path # => "/" ;TI"&port = uri.port # => 443 ;T;0o; ;[I"0So that example requests may be written as:;T@o;;[I"Net::HTTP.get(uri) ;TI",Net::HTTP.get(hostname, '/index.html') ;TI")Net::HTTP.start(hostname) do |http| ;TI" http.get('/todos/1') ;TI" http.get('/todos/2') ;TI" end ;T;0o; ;[I"^An example that needs a modified URI first duplicates +uri+, then modifies the duplicate:;T@o;;[I"_uri = uri.dup ;TI"_uri.path = '/todos/1';T;0: @fileI"$lib/net/http/generic_request.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I" body;TI"R;T:publicFI"$lib/net/http/generic_request.rb;T[ I"body_stream;T@M;F@N[ I"decode_content;T@M;F@N[ I"method;T@M;F@N[ I" path;T@M;F@N[ I"uri;T@M;F@N[ [[I"Net::HTTPHeader;To;;[ ;@I;0@N[[I" class;T[[;[ [:protected[ [:private[ [I" instance;T[[;[ [I" body=;T@N[I"body_stream=;T@N[I"inspect;T@N[I"request_body_permitted?;T@N[I"response_body_permitted?;T@N[;[ [;[[I"encode_multipart_form_data;T@N[I"flush_buffer;T@N[I"quote_string;T@N[I"send_request_with_body;T@N[I" send_request_with_body_data;T@N[I""send_request_with_body_stream;T@N[I" supply_default_content_type;T@N[I"wait_for_continue;T@N[I"write_header;T@N[ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@I@IcRDoc::TopLevel