Skip to content

Instantly share code, notes, and snippets.

@abdollar
Created February 18, 2012 19:59
Show Gist options
  • Select an option

  • Save abdollar/1860869 to your computer and use it in GitHub Desktop.

Select an option

Save abdollar/1860869 to your computer and use it in GitHub Desktop.
Debugging http with tcpflow
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
@abdollar

Copy link
Copy Markdown
Author

-n was changed to -i

sudo tcpflow -c -i en1 src or dst host api.example.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment