String
The response from RestClient looks like a string, but is actually one of these. 99% of the time you’re making a rest call all you care about is the body, but on the occassion you want to fetch the headers you can:
RestClient.get('http://example.com').headers[:content_type]
HTTP status code, always 200 since RestClient throws exceptions for other codes.
# File lib/restclient/response.rb, line 18 18: def code 19: @code ||= @net_http_res.code.to_i 20: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.