Topics

RestClient.get 'http://example.com/resource' will return response object or String?

Snow Hellsing <snow.hellsing@...>
 

Hi,

documents at http://rdoc.info/github/rest-client/rest-client and https://github.com/rest-client/rest-client says that, `RestClient.get 'http://example.com/resource'` will return response object.

but when I tried that, found a String object containing response body is returned.

Did I do anything wrong? Or the document is incorrect?

PS: I tried this in rails console, with `gem 'rest-client'` in Gemfile.

Best regards.