To see the content POST data trasferred by jQuery
Asked Answered
T

2

13

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: To make an action based on the link location by jQuery

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

Touch answered 29/8, 2009 at 7:43 Comment(0)
F
24

You can use the Network tab and look at the params tab as shown below (this was a get request to google where I search for the word hello).

alt text
(source: gyazo.com)

Felicitous answered 29/8, 2009 at 7:50 Comment(5)
Safari's Web Inspector has something similar, but for some reason does nos show the parameters for a POST Ajax call -- #1338397Stair
Just an FYI.... If you don't have an parameters passed, the "params" panel is missing. I thought I had a different version of Firebug or something b/c I didn't see it but it turned out that the reason my code isn't working is b/c I'm just not passing anything... lol...Lorgnon
Link down? Btw. setting alt text to "alt text" doesn't help much.Lamoureux
@DavidMašek what can I say, it was 6 yrs ago...!Felicitous
@Felicitous Fair point. I didn't notice and found the 'alt text' alt text kinda funny. But your answer is still usefull after 6 years, so good work and thanks.Lamoureux
G
2

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).

Gibbosity answered 29/8, 2009 at 7:49 Comment(4)
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.Gibbosity
+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.)Stair
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.Gibbosity
(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.)Stair

© 2022 - 2024 — McMap. All rights reserved.