Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP Logging in rails?

Does anyone know of a plugin / gem that will log any HTTP requests your rails app may be making when responding to a request? For example if you are using HTTParty to hit an API, how can you see what outbound requests are coming out of your rails app?

like image 944
bwizzy Avatar asked Dec 10 '09 14:12

bwizzy


1 Answers

You have to tell the outbound HTTP client to use a proxy.

For HTTParty it's fairly simple (from the docs),

class Twitter
    include HTTParty
    http_proxy 'http://myProxy', 1080

If you're looking for a proxy to set up, personally I like Paros proxy (Java so cross platform and does SSL).

like image 106
Michiel Kalkman Avatar answered Oct 19 '22 02:10

Michiel Kalkman