voidcmd

voidcmd(cmd) Instance Public methods Sends a command and expect a response beginning with '2'.

Proxy

Proxy(p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil) Class Public methods Creates an HTTP proxy class which behaves like Net::HTTP, but performs all access via the specified proxy. This class is obsolete. You may pass these same parameters directly to ::new. See ::new for details of the arguments.

default_port

default_port() Class Public methods The default port to use for HTTP requests; defaults to 80.

get

get(uri_or_host, path = nil, port = nil) Class Public methods Sends a GET request to the target and returns the HTTP response as a string. The target can either be specified as (uri), or as (host, path, port = 80); so: print Net::HTTP.get(URI('http://www.example.com/index.html')) or: print Net::HTTP.get('www.example.com', '/index.html')

get_print

get_print(uri_or_host, path = nil, port = nil) Class Public methods Gets the body text from the target and outputs it to $stdout. The target can either be specified as (uri), or as (host, path, port = 80); so: Net::HTTP.get_print URI('http://www.example.com/index.html') or: Net::HTTP.get_print 'www.example.com', '/index.html'

get_response

get_response(uri_or_host, path = nil, port = nil, &block) Class Public methods Sends a GET request to the target and returns the HTTP response as a Net::HTTPResponse object. The target can either be specified as (uri), or as (host, path, port = 80); so: res = Net::HTTP.get_response(URI('http://www.example.com/index.html')) print res.body or: res = Net::HTTP.get_response('www.example.com', '/index.html') print res.body

http_default_port

http_default_port() Class Public methods The default port to use for HTTP requests; defaults to 80.

https_default_port

https_default_port() Class Public methods The default port to use for HTTPS requests; defaults to 443.

is_version_1_2?

is_version_1_2?() Class Public methods Alias for: version_1_2?

new

new(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil) Class Public methods Creates a new Net::HTTP object without opening a TCP connection or HTTP session. The address should be a DNS hostname or IP address, the port is the port the server operates on. If no port is given the default port for HTTP or HTTPS is used. If none of the p_ arguments are given, the proxy host and port are taken from the http_proxy environment variable (or its uppercase equivale