jnadro52
jnadro52

Reputation: 3624

Breaking On/Viewing/Modifying Request Headers before they are sent using Google Chrome

I've been searching for a while now and can't seem to find an answer to my question. I want to be able to set some kind of a break point in Google Chrome directly before a request is sent, allowing me to see and modify the request from the browser to the server.

In addition, I would like to be able to save these requests and re-send them in the future. This would be useful for testing a large web form, as you could enter the information once and not have to re-enter it again when testing later.

If anyone is aware of a feature or extension available for Google Chrome that would allow this, your answer would be greatly appreciated. Thank you.

(If anyone knows how to only do this in Firefox, or any other browser, that would be an acceptable answer as well. Although, I would much rather do it from Chrome, as it is my browser of choice)

Upvotes: 2

Views: 2295

Answers (2)

yonran
yonran

Reputation: 19134

Chrome is building bits and pieces of what you ask for into the Developer Tools. In the Developer Tools, expand the "XHR Breakpoints" button and click the Plus sign to add a breakpoint. Unfortunately, you can't modify the request though.

In the pipeline there are APIs to let a future extension

But there's still nothing in the pipeline to do everything you asked:

  • You can't cleanly save the POST data for an XMLHttpRequest or form submission.
  • You can't cleanly modify URL or POST data before it is sent.

Upvotes: 2

canihavesomecoffee
canihavesomecoffee

Reputation: 163

Firefox has multiple extensions for cases like this:

Tamper data

Modify Headers

A quick google also seems to point that (at least at date of publishing) there was no API available in Chrome that allowed a similar extension. I'm quite sure that if an API would have been available, an extension would have been ported/made already.

Upvotes: 1

Related Questions