views:

303

answers:

6

I'm looking for something (preferably a Firefox extension) which will allow me to see all AJAX subrequests. Basically, anytime an XMLHTTPRequest() is made, I want to know what URL was being requested and what (if any) GET and POST vars were passed along with it.

Unless I'm missing it, I don't see anything quite like this in Firebug or Web Developer Toolbar.

(In case you're curious, the main reason for wanting this is that I want to scrape a local copy of a site that is using JS to load all its contents, and I don't want to spend hours digging through their JS code when I could just see the subrequests being made.)

+24  A: 

Firebug should show it in the Net panel.

EDIT: Also, if Firebug slows down your Firefox in a way that makes it unusable, like it does for me sometimes, WireShark (formerly Ethereal) will analyze all network traffic on your system, including HTTP and AJAX requests.

Chris Doggett
aha! now I feel like a dummy. :-(
Kip
+7  A: 

Fiddler 2 is a great tool for watching HTTP traffic. - http://www.fiddler2.com/fiddler2/

Nate Bross
+1, Fiddler works with every browser, Firebug is tied to FF
Daniel Silveira
+4  A: 

Firebug shows them in both the Net panel, and the Console view. You need to turn on "Show XMLHttpRequests" though.

Jon Benedicto
+5  A: 
aleemb
Thanks, this is great too!
Kip
+1  A: 

Have a look at Tamper Data as well. It's a Firefox add-on that lets you have a look at each individual HTTP request (including any post data) and response, and the headers of both. I've found it very useful for debugging AJAX problems...although Firebug works just fine.

Jim McGaw