Skip to content

Instantly share code, notes, and snippets.

@natritmeyer
Last active May 24, 2024 20:46
Show Gist options
  • Select an option

  • Save natritmeyer/6495044 to your computer and use it in GitHub Desktop.

Select an option

Save natritmeyer/6495044 to your computer and use it in GitHub Desktop.
How to debug HTTParty requests
class MyResource
include HTTParty
debug_output $stdout # <= will spit out all request details to the console
#...
end
@Deekor

Deekor commented Jan 8, 2017

Copy link
Copy Markdown

Nevermind I found it: response = HTTParty.post(url, :body => body, :debug_output => $stdout)

@hcarreras

Copy link
Copy Markdown

You made my day :)

@Murphydbuffalo

Copy link
Copy Markdown

Yayyy thank you kindly :)

@andey

andey commented Jun 14, 2018

Copy link
Copy Markdown

How to write this to the rails logger ?

@gabrielms

Copy link
Copy Markdown

Thank you!!

@fongfan999

Copy link
Copy Markdown

You saved my bacon. Thank you.

@uhrohraggy

Copy link
Copy Markdown

This is amazingly still valuable 7 years later, thank you!

@carlosrdemoura

Copy link
Copy Markdown

Thanks!

@fguillen

Copy link
Copy Markdown
HTTParty::Basement.debug_output $stdout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment