Is it possible to see the data of a post request in Firefox or Chrome?
Asked Answered
A

7

40

How can I intercept the post data a page is sending in FF or Chrome via configuration, extension or code? (Code part makes this programming related. ;)

I currently use Wireshark/Ethereal for this, but it's a bit difficult to use.

Ascending answered 25/10, 2009 at 23:23 Comment(1)
related: Chrome: Source of Post Data?Nordin
D
11

Do you have control of the browser POSTing the data?

If you do, then just use Firebug. It's got a lot of usefull features, including this

Diphthong answered 25/10, 2009 at 23:27 Comment(2)
Agree, and FireBug is the only reason why i still use FireBug.At
Just a little added note: to keep the POST data from being cleared on page reload (like after you click a Submit button), go the Firebug "Net" tab and click the "Persist" button to keep POST history between pages.Ultramicrometer
K
29

You could just use the Chrome Developer Tools, if you only need to track requests. Activate them with Ctrl+Shift+I and select the Network tab.

This works also when Chrome talks HTTPS with another server (and unless you have the HTTPS private key you cannot use Wireshark to sniff that traffic).

(I copied this answer from this related query.)

Kalsomine answered 9/4, 2011 at 20:34 Comment(2)
As far as i know, only FireBug in Firefox has feature to track send POST data. I have tested with Safari and Chrome, they didn't have it.At
@At It works fine in Chrome? I click CTRL + SHIFT + I then Chrome opens the Developer Tools window and then I click the "Network" tab. Now, if my browser makes a network request it appears on a row in this Network tab. I click that row, and if it's a POST request Chrome shows a Form Data section a bit further below on the Headers tab.Kalsomine
A
25

With Firefox you can use the Network tab (Ctrl+Shift+E or Command+Option+E). The sub-tab "Params" shows the submitted form data.

Reference: https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor/request_details#Params

Alternatively, in the console (Ctrl+Shift+K or Command+Option+K) right click on the big pane and check "Log Request and Response Bodies". Then when the form is submitted, a line with POST <url> will appear. Click on it; it will open a new window with the form data.

As of the time of originally writing this reply, both methods messed up newlines in textarea fields. The former deleted them, the latter converted them to blanks. I haven't checked with a newer version.

Alexiaalexin answered 24/8, 2015 at 15:20 Comment(4)
Brilliant, just what I was looking for, I could see the headers with various extensions but not the data posted, cheers. You can also see what it brought back in the individual request in the Response section etc.Elinaelinor
Apologies. Apparently the shortcut has been changed to Ctrl+Shift+E - developer.mozilla.org/en-US/docs/Tools/Network_Monitor. I've edited the question. Thanks for letting me know.Alexiaalexin
I can't see the "Log Request and Response Bodies" checkbox on Firefox 77.0. Is it still there?Hexamerous
@PedroGimeno I closed the network tab and reopened it but i can't see the previous network details. Is there any way to see those once you've reopened the network tab?Mechanistic
D
11

Do you have control of the browser POSTing the data?

If you do, then just use Firebug. It's got a lot of usefull features, including this

Diphthong answered 25/10, 2009 at 23:27 Comment(2)
Agree, and FireBug is the only reason why i still use FireBug.At
Just a little added note: to keep the POST data from being cleared on page reload (like after you click a Submit button), go the Firebug "Net" tab and click the "Persist" button to keep POST history between pages.Ultramicrometer
L
3

For Firefox there is also TamperData, and even more powerful and cross-browser is Fiddler.

Lactone answered 26/10, 2009 at 0:7 Comment(1)
For nowadays versions, there's Temper Data for Quantum: addons.mozilla.org/en-US/firefox/addon/…Shrift
I
0

Programatically, you can do this with dBug - it's a small code module you can integrate into any website. I use it with CodeIgniter and it works perfectly.

Inchoative answered 31/8, 2019 at 13:49 Comment(0)
P
0

In network tab of Web Developer tools in firefox right click on the PUT, POST or any type of request, you will find "Use as Fetch in Console" option. Here we can seed the data we are passing.

Pilocarpine answered 29/8, 2022 at 11:27 Comment(0)
E
0

Do the respective steps sequentially.

Firefox Inspect Network POST Request

Elissa answered 15/12, 2022 at 22:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.