Is there a way to modify an HTTP request in Chrome or Firefox?
Solution 1
This might help in some cases - use fetch command to send another, tampered, request. here's how to do it in Chrome:
- open DevTools, tab Network
- clear
- create your request normally
- right click that request and select Copy > Copy as fetch
- go to Console tab and paste
- tamper the data and hit Enter
Solution 2
There are many tools/ extensions in Chrome and Firefox which allow you to modify network requests.
One such example is Requestly. Using Requestly you can do the following tasks:
- Redirect network requests.
- Block websites or specific requests.
- Switch domains using Replace Rule.
- Modify Headers
- Modify UserAgent Documentation1 Documentation 2
- File Library (Host JS, CSS, JSON) and use them in Requestly rules
There are more features but for your specific use case. You can host your js or css on library and redirect to it using Redirect Rule. If you have URL rewriting requirement, then you can use either Redirect or Replace rule.
I won't say Requestly is as powerful as Fiddler or Charles but I'd say that it is pretty close with much simplistic UI.
Disclaimer: I built Requestly!
Solution 3
You can use tweak chrome extension and you'll be able to do exactly that, intercept and modify HTTP requests.
J. Lin
Updated on July 09, 2022Comments
-
J. Lin almost 2 years
Is there a way to modify an HTTP request using Chrome dev tools or Firebug? For example when developing locally and testing in Chrome, I have a page that needs an HTTP request to fill some data. Because it's local, that service isn't available.
Currently the only way of getting around the problem is configuring a proxy pass in Apache so it hits a QA environment for that call. I'm looking or a simpler way to achieve this because I use Jetty to test the app and can't configure a proxy pass (or that I know of).
In other words, is there a way to create a temporary proxy pass for the current session when testing an app locally?