'How to intercept or pause http status code 301 request in a browser

I am looking for a solution to interrupt or pause a 301 ( redirect ) request in Chrome dev tools. My scenario is I have an API integration with a local payment gateway which requires 301 redirect to their server ( HTTP GET and then redirect with 301 to an external URL). As 301 HTTP status code happens on the client-side so this can be compromised as the current system does not protect the integrity of the data, for instance, the amount to pay. I might send 100$ and the user might change it to 20$.

To prove this I need to stop the request manually which is very inconvenient and hard to test. I am looking for a solution that implements in one of my favorite browsers above that allows me to config to interrupt or pause the 301 HTTP status code so I can easily modify the value in the URL before resuming the request.



Solution 1:[1]

I found a chrome extension to solve this issue.

Requestly is easy to use and test. This is what being mentioned in the extension page:

Chrome Extension to modify HTTP requests (Setup Redirects, Run Custom Javascript, Modify Headers

But my scenario is about modifying url query string - not being mentioned in the description but it works perfectly.

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 channa ly