Creates a new StringInputMethod
object
Returns a new Net::HTTP object http
(but does not open a TCP connection or HTTP session).
With only string argument address
given (and ENV['http_proxy']
undefined or nil
), the returned http
:
Has the given address.
Has the default port number, Net::HTTP.default_port
(80).
Has no proxy.
Example:
http = Net::HTTP.new(hostname) # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false> http.address # => "jsonplaceholder.typicode.com" http.port # => 80 http.proxy? # => false
With integer argument port
also given, the returned http
has the given port:
http = Net::HTTP.new(hostname, 8000) # => #<Net::HTTP jsonplaceholder.typicode.com:8000 open=false> http.port # => 8000
For proxy-defining arguments p_addr
through p_no_proxy
, see Proxy Server.
Returns a new Net::HTTP object http
(but does not open a TCP connection or HTTP session).
With only string argument address
given (and ENV['http_proxy']
undefined or nil
), the returned http
:
Has the given address.
Has the default port number, Net::HTTP.default_port
(80).
Has no proxy.
Example:
http = Net::HTTP.new(hostname) # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false> http.address # => "jsonplaceholder.typicode.com" http.port # => 80 http.proxy? # => false
With integer argument port
also given, the returned http
has the given port:
http = Net::HTTP.new(hostname, 8000) # => #<Net::HTTP jsonplaceholder.typicode.com:8000 open=false> http.port # => 8000
For proxy-defining arguments p_addr
through p_no_proxy
, see Proxy Server.
Creates an HTTP request object for path
.
initheader
are the default headers to use. Net::HTTP
adds Accept-Encoding to enable compression of the response body unless Accept-Encoding or Range
are supplied in initheader
.
Creates a new URI::FTP
object from generic URL components with no syntax checking.
Unlike build(), this method does not escape the path component as required by RFC1738; instead it is treated as per RFC2396.
Arguments are scheme
, userinfo
, host
, port
, registry
, path
, opaque
, query
, and fragment
, in that order.
Create a PrettyPrint::SingleLine
object
Arguments:
output
- String
(or similar) to store rendered text. Needs to respond to ‘<<’
maxwidth
- Argument position expected to be here for compatibility.
This argument is a noop.
newline
- Argument position expected to be here for compatibility.
This argument is a noop.
Initialize a new ClassVariableAndWriteNode
node.
Initialize a new ClassVariableOrWriteNode
node.
Initialize a new ClassVariableOperatorWriteNode
node.
Initialize a new ConstantAndWriteNode
node.
Initialize a new ConstantOrWriteNode
node.
Initialize a new ConstantOperatorWriteNode
node.
Initialize a new GlobalVariableAndWriteNode
node.
Initialize a new GlobalVariableOrWriteNode
node.
Initialize a new GlobalVariableOperatorWriteNode
node.
Initialize a new InstanceVariableAndWriteNode
node.
Initialize a new InstanceVariableOrWriteNode
node.