method
request_get
![Moderate documentation Importance_2](https://d2vfyqvduarcvs.cloudfront.net/images/importance_2.png?1349367920)
request_get(path, initheader = nil)
public
Sends a GET request to the path and gets a response, as an HTTPResponse object.
When called with a block, yields an HTTPResponse object. The body of this response will not have been read yet; the caller can process it using 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 here. p response['content-type'] puts response.body # using block http.request_get('/index.html') {|response| p response['content-type'] response.read_body do |str| # read body now print str end }