Does anyone know of a / gem plugin that will log any HTTP requests that your rail application can create when responding to a request? For example, if you use HTTParty to access the API, how can you see which outgoing requests come from your rails application?
You must tell the outgoing HTTP client to use a proxy.
For HTTParty, it's pretty simple (from docs ),
class Twitter include HTTParty http_proxy 'http://myProxy', 1080
If you are looking for a proxy server to configure, I personally like the Paros proxy (Java is so cross-platform and SSL).
http_logger gem:
require 'http_logger' Net::HTTP.logger = Logger.new(...) # defaults to Rails.logger if Rails is defined Net::HTTP.colorize = true # Default: true
, Net:: HTTP.
https://github.com/railsware/http_logger
, Charles Proxy - .
, , logger.debug().
, , IP http_proxy:
http_proxy
http_proxy '10.2.2.1', 8888
, http://, , SocketError: getaddrinfo: nodename nor servname provided
SocketError: getaddrinfo: nodename nor servname provided
httplog gem, , , ..