Created
February 18, 2012 19:59
-
-
Save abdollar/1860869 to your computer and use it in GitHub Desktop.
Debugging http with tcpflow
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
| sudo tcpflow -c -n en1 src or dst host api.example.com | |
| EM.run do | |
| request = EventMachine::HttpRequest.new('http://api.example.com/') | |
| deferrable = request.get :path => '/api/v2/chickens.json' | |
| deferrable.callback { puts "It worked"; EM.stop } | |
| deferrable.errback { puts "It failed"; EM.stop } | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-n was changed to -i
sudo tcpflow -c -i en1 src or dst host api.example.com