Last active
May 24, 2024 20:46
-
-
Save natritmeyer/6495044 to your computer and use it in GitHub Desktop.
How to debug HTTParty requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyResource | |
include HTTParty | |
debug_output $stdout # <= will spit out all request details to the console | |
#... | |
end |
You saved my day. 👍
thanks! 👍
Any idea on how to configure this if you are not including HTTParty into your class and just calling the method directly?
Example:
HTTParty.post("myurl")
Nevermind I found it: response = HTTParty.post(url, :body => body, :debug_output => $stdout)
You made my day :)
Yayyy thank you kindly :)
How to write this to the rails logger ?
Thank you!!
You saved my bacon. Thank you.
This is amazingly still valuable 7 years later, thank you!
Thanks!
HTTParty::Basement.debug_output $stdout
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Blogged about this here: http://natritmeyer.com/blog/2013/09/09/how-to-debug-httparty-requests/