- Defined in:
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:
Instance Attribute Summary
Attributes included from
Instance Method Summary collapse
#initialize(string, net_http_res) ⇒ Response
A new instance of Response.
Methods included from
, , , , ,
#initialize(string, net_http_res) ⇒
Returns a new instance of Response.
14 15 16 17
# File 'lib/restclient/response.rb', line 14 def initialize(string, net_http_res) @net_http_res = net_http_res super(string || "") end