genxgeek
genxgeek

Reputation: 13367

How to intercept web url from chrome and add headers to the request?

given: my chrome browser hits the following url that renders a single page application web view (index.jsp).

url: http://server/dostuff?stuff=123

however, what I want to do is somehow intercept that GET request and tack on a header to it (i.e. X-HIDE-MAIN-FOOTER). if this header is present the code simply hides the footer.

doing so would allow me to see the output per chrome (and verify the footer is hidden.

I have tried sending a raw GET request through postman and other api-rest test tools with that header included in the GET request but the payload comes back with a lot of javascript tags (the same ones as a regular request so I can't tell if the header is hidden or not) and won't render the page in preview mode per postman nor can I save the file locally as .html to see what gets rendered.

any ideas here how to achieve something like this?

Upvotes: 1

Views: 2288

Answers (1)

genxgeek
genxgeek

Reputation: 13367

This worked very well

https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj?hl=en

credit to @Allahbaksh Asadullah

Upvotes: 2

Related Questions