Created
March 22, 2012 20:34
-
-
Save ryanlecompte/2163807 to your computer and use it in GitHub Desktop.
Monkey-patching the aws-sdk gem to dump its raw requests
This file contains hidden or 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
require 'aws-sdk' | |
module RequestDumper | |
def new(*args, &block) | |
super.extend(DumpRequests) | |
end | |
module DumpRequests | |
def request(*args, &block) | |
puts "SENDING: #{args.first.body}" | |
super | |
end | |
end | |
end | |
Net::HTTP::ConnectionPool::Connection.extend(RequestDumper) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment