D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Net
/
HTTP
/
Filename :
new-c.ri
back
Copy
U:RDoc::AnyMethod[iI"new:ETI"Net::HTTP::new;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I",Returns a new \Net::HTTP object +http+ ;TI";(but does not open a TCP connection or \HTTP session).;To:RDoc::Markup::BlankLine o; ; [I"/With only string argument +address+ given ;TI":(and <tt>ENV['http_proxy']</tt> undefined or +nil+), ;TI"the returned +http+:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"Has the given address.;To;;0; [o; ; [I">Has the default port number, Net::HTTP.default_port (80).;To;;0; [o; ; [I"Has no proxy.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [ I"$http = Net::HTTP.new(hostname) ;TI"B# => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false> ;TI"6http.address # => "jsonplaceholder.typicode.com" ;TI"http.port # => 80 ;TI"http.proxy? # => false ;T:@format0o; ; [I".With integer argument +port+ also given, ;TI",the returned +http+ has the given port:;T@o;; [I"*http = Net::HTTP.new(hostname, 8000) ;TI"D# => #<Net::HTTP jsonplaceholder.typicode.com:8000 open=false> ;TI"http.port # => 8000 ;T;0o; ; [I"AFor proxy-defining arguments +p_addr+ through +p_no_proxy+, ;TI"9see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below000[ I"v(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, p_no_proxy = nil, p_use_ssl = nil);T@=TI" HTTP;TcRDoc::NormalClass00