277

I would like to view HTTP POST data that was sent in Chrome.

The data is in memory now, and I have the ability to resubmit the form.

I know that if I resubmit the server will throw an error. Is there anyway I can view the data that is in Chrome's memory?

2

8 Answers 8

289
  1. Go to Chrome Developer Tools (Chrome Menu -> More Tools -> Developer Tools)
  2. Choose "Network" tab
  3. Refresh the page you're on
  4. You'll get list of http queries that happened, while the network console was on. Select one of them in the left
  5. Choose "Headers" tab

Voila!

enter image description here

Sign up to request clarification or add additional context in comments.

12 Comments

This is GET, not POST
It captures both GET and POST requests, @QkiZ
Note: To actually see a post request that reloads your page, you need to check "Preserve Log".
I am missing the request body here? :-(
In Chrome 71, the body (ie. POST-ed data) shows up at the bottom of the Headers tab under the "Request Payload" heading.
|
201

You can filter for HTTP POST requests with the Chrome DevTools. Just do the following:

  1. Open Chrome DevTools (Cmd+Opt+I on Mac, Ctrl+Shift+I or F12 on Windows) and click on the "Network" tab
  2. Click on the "Filter" icon
  3. Enter your filter method: method:POST
  4. Select the request you want to debug
  5. View the details of the request you want to debug

Screenshot

Chrome DevTools

Tested with Chrome Version 53.

4 Comments

Worked on Chrome 70. Filtering using method:POST is very useful
I am trying to do the same. But it is still showing Get method.. Not converting to POST method In the Name: It 's showing nothing. In response I am getting only {"stat":"fail","desc":"Service Unavailable"}
This does not apply to multipart POST requests if a file was submitted: stackoverflow.com/a/59871612/929999
Where is the request body?
17

You can use Canary version of Chrome to see request payload of POST requests.

Request payload

2 Comments

Are there any links for more details on this or when it changed? EDIT: Answered my own question. If you're using the Fetch API, Chrome wasn't capturing these requests to show in the tab. Apparently Canary is or will be soon.
Now it's available in standard builds of chrome itself!
15

On Chrome 96 DevTools Network Tab;

After clicking the request, there is a "Payload" tab that shows the Form Data:

enter image description here

You can view the data as url encoded / decoded:

![enter image description here

You can view the data as source / parsed:

enter image description here

Even if the method is GET you can see the Payload as Query String Parameters:

enter image description here

1 Comment

It's great that they moved the payload to a new tab. However, if you're inspecting the payload of different requests, every time you move (click or arrow key) to a new request, the default tab is Headers. Thus you have to click on Payload again and again. A bit cumbersome for this use case.
13

Another option that may be useful is a dedicated HTTP debugging tool. There's a few available, I'd suggest HTTP Toolkit: an open-source project I've been working on (yeah, I might be biased) to solve this same problem for myself.

The main difference is usability & power. The Chrome dev tools are good for simple things, and I'd recommend starting there, but if you're struggling to understand the information there, and you need either more explanation or more power then proper focused tools can be useful!

For this case, it'll show you the full POST body you're looking for, with a friendly editor and highlighting (all powered by VS Code) so you can dig around. It'll give you the request & response headers of course, but with extra info like docs from MDN (the Mozilla Developer Network) for every standard header and status code you can see.

A picture is worth a thousand StackOverflow answers:

A screenshot of HTTP Toolkit showing a POST request and its body

3 Comments

Looks very promising, but there are some issues on my machine, posted them on GitHub.
open-source? It's a paid application. No possibility to generate cURL request like in Chrome Dev Tools, you need to pay for this
It is 100% open-source. All source for everything is in the repos at github.com/httptoolkit under a mix of AGPLv3 & Apache 2 licenses. Some advanced settings & features (like export-request-as-code) are paid to fund development, but they're open-source too - you're welcome to fork, disable that, and use absolutely everything entirely for free if you prefer. More background here: httptoolkit.com/blog/free-as-in-beer
4

It has a tricky situation: If you submit a post form, then Chrome will open a new tab to send the request. It's right until now, but if it triggers an event to download file(s), this tab will close immediately so that you cannot capture this request in the Dev Tool.

Solution: Before submitting the post form, you need to cut off your network, which makes the request cannot send successfully so that the tab will not be closed. And then you can capture the request message in the Chrome Devtool(Refreshing the new tab if necessary)

1 Comment

The network disconnect idea worked great in my situation, thank you.
2

The Network tab is all you need...

enter image description here

Comments

1

The other people made very nice answers, but I would like to complete their work with an extra development tool. It is called Live HTTP Headers and you can install it into your Firefox, and in Chrome we have the same plug in like this.

Working with it is queit easy.

  1. Using your Firefox, navigate to the website which you want to get your post request to it.

  2. In your Firefox menu Tools->Live Http Headers

  3. A new window pop ups for you, and all the http method details would be saved in this window for you. You don't need to do anything in this step.

  4. In the website, do an activity(log in, submit a form, etc.)

  5. Look at your plug in window. It is all recorded.

Just remember you need to check the Capture.

enter image description here

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.