4

I can log simple request like below from the instructions post here

Logging RestClient in a Rails app

It logs the request but it does not log the response back from the call.

Is there anyway to tell RestClient to log the response as well?

Community
  • 1
  • 1
Siva Kandaraj
  • 824
  • 7
  • 15

1 Answers1

0

I'm not sure if you can do it automagically, but you can just do it manually - usually this is only for dev / debugging anyway:

response = RestClient.get 'http://example.com/resource'
puts response

// or break it up
puts response.code
puts response.headers
// and so on
Strat
  • 171
  • 5