views:

315

answers:

2

How can you see what the attribute rel contains when it is transferred by POST?

I transfer a variable by the rel attribute by jQuery. I would like to know what the attribute, $_POST['answer'], contains.

This question is based on this thread.

jQuery IRC tells me that the solution seems to be Firebug somehow. How can you see POST data in Firebug?

+2  A: 

There are various tools you can use to capture such information. I use a plugin for Firefox called Live HTTP Headers, which lets you view the HTTP headers that are being transferred in each request, so you would be able to view your post variable.

Firebug can also be used, it is also a plugin available for Firefox. Select the Net tab, then select All. Here you will see a list of all requests. Now you can expand each request to view the headers (and hence the post variables).

DaveJohnston
My answer was posted before the line 'How can you see POST data in Firebug?' was added to the original question, don't really think it deserves to be down voted.
DaveJohnston
+1 for Live HTTP Headers, because it also allows for re-sending the same request after changing some of the data. (I don't see an earlier revision of this question without that line about how to use Firebug though. Still, I think the introduction of the question is long enough to assume the questioner is open to alternatives.)
Arjan
I don't see an earlier revision either, but unless I am going mad that line was not there when I first looked at the question. Given that it is in bold too I don't see how I could have missed it.
DaveJohnston
(If it makes you sleep better to know you're not going mad: question was asked at 07:43, your answer was posted 07:49. I guess the change was made in the 5 minute window during which one can edit posts without creating a new revision, while you were typing your answer then.)
Arjan
+3  A: 
redsquare
Safari's Web Inspector has something similar, but for some reason does nos show the parameters for a POST Ajax call -- http://stackoverflow.com/questions/1337897/how-to-debug-xhr-post-requests-in-safari-4
Arjan