Method: TinyClient::Response#to_hash
- Defined in:
- lib/tiny_client/response.rb
#to_hash ⇒ Object
Returns Hash with url, status, body and headers fields.
67 68 69 70 71 72 73 74 |
# File 'lib/tiny_client/response.rb', line 67 def to_hash { 'url' => url, 'status' => status, 'body' => (parse_body rescue body_str), 'headers' => (parse_headers rescue header_str) } end |