Andrew
Andrew

Reputation: 238717

How to "tail" raw HTTP requests to web app?

I am new to working with raw HTTP and am trying to work with some relatively low-level libraries for making HTTP requests from a micro-controller. I have written a Sinatra application for the micro-controller to POST to. However, I don't know how to "tail" or view the raw HTTP requests coming in to see if I have formatted them correctly. What sorts of things can I do (apps, libraries, commands, ruby or other) in order to tail/view the raw HTTP request?

Upvotes: 3

Views: 1088

Answers (2)

Steve Dispensa
Steve Dispensa

Reputation: 247

It's easy to use Wireshark to sniff the traffic; just run it on the server itself or on a third computer connected to the other two by a span port or hub. Wireshark's dissectors can help you ensure your formatting is reasonable.

Upvotes: 1

Cheeso
Cheeso

Reputation: 192467

If your communication stack allows you to specify a proxy, you can use Fiddler2, an HTTP debugging proxy, to peek at the HTTP requests and responses.

It's free, Windows only. If that doesn't work for you, there are similar options on other platforms. search for HTTP Debugging proxy.

enter image description here

Upvotes: 3

Related Questions