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::HTTPResponse#read_body, if desired.

This method never raises Net::* exceptions.

doc_ruby_on_rails
2015-04-20 23:37:52
Comments
Leave a Comment

Please login to continue.