set_debug_output

set_debug_output(output) Instance Public methods WARNING This method opens a serious security hole. Never use this method in production code. Sets an output stream for debugging. http = Net::HTTP.new http.set_debug_output $stderr http.start { .... }

send_request

send_request(name, path, data = nil, header = nil) Instance Public methods Sends an HTTP request to the HTTP server. Also sends a DATA string if data is given. Returns a Net::HTTPResponse object. This method never raises Net::* exceptions. response = http.send_request('GET', '/index.html') puts response.body

request_post

request_post(path, data, initheader = nil) Instance Public methods Sends a POST request to the path. Returns the response as a Net::HTTPResponse object. When called with a block, the block is passed an HTTPResponse object. The body of that response will not have been read yet; the block can process it using Net::HTTPResponse#read_body, if desired. Returns the response. This method never raises Net::* exceptions. # example response = http.request_post('/cgi-bin/nice.rb', 'datadatad

request_head

request_head(path, initheader = nil, &block) Instance Public methods Sends a HEAD request to the path and returns the response as a Net::HTTPResponse object. Returns the response. This method never raises Net::* exceptions. response = http.request_head('/index.html') p response['content-type'] head2

request_get

request_get(path, initheader = nil) Instance Public methods Sends a GET request to the path. Returns the response as a Net::HTTPResponse object. When called with a block, passes an HTTPResponse object to the block. The body of the response will not have been read yet; the block can process it using Net::HTTPResponse#read_body, if desired. Returns the response. This method never raises Net::* exceptions. response = http.request_get('/index.html') # The entity body is already read in

request

request(req, body = nil) Instance Public methods Sends an HTTPRequest object req to the HTTP server. If req is a Net::HTTP::Post or Net::HTTP::Put request containing data, the data is also sent. Providing data for a Net::HTTP::Head or Net::HTTP::Get request results in an ArgumentError. Returns an HTTPResponse object. When called with a block, passes an HTTPResponse object to the block. The body of the response will not have been read yet; the block can process it using Net::HTTPRes

read_timeout=

read_timeout=(sec) Instance Public methods Setter for the #read_timeout attribute.

proxyport

proxyport() Instance Public methods Alias for: proxy_port

proxyaddr

proxyaddr() Instance Public methods Alias for: proxy_address

proxy_user

proxy_user() Instance Public methods The proxy username, if one is configured