Created
December 18, 2013 09:31
-
-
Save bsgreenb/8019637 to your computer and use it in GitHub Desktop.
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
agent.pre_connect_hooks << Proc.new do |agent, request| | |
puts { :method => request.method, :path => request.path, :headers => request.to_hash, :post_params => request.body } | |
end | |
agent.post_connect_hooks << Proc.new do |agent, uri, response, body| | |
puts { :status_code => response.code, :response_headers => response.to_hash, :mechanize_response_body => body, :mechanize_uri => uri} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment