Although Chrome DevTools lack the capability of modifying HTTP requests & responses - Rerouting URLs, Modifying Headers, Modifying API responses on the fly for quick prototyping & testing use cases.
Requestly an Open-Source browser extension - https://github.com/requestly/requestly fills this void. It leverages chrome webRequest API (MV2) [0] & chrome declarativeNetRequest API (MV3) [1] to provide support for most of the modifications. To override API request payload & response body, Requestly overrides native XHR & fetch objects' prototype, and registers its own interceptor.
Requestly desktop app [2] runs a local server (aka proxy) on localhost:8171 and provides options to connect installed browsers & mobile devices to the local proxy. The proxy module is a simple node-based MITM proxy available here [3]. A separate rule processor module applies the modifications defined by the user.
Listed down a few problems that HTTP modifications can solve in this article [4]
[0]: https://developer.chrome.com/docs/extensions/reference/webRe...
[1]: https://developer.chrome.com/docs/extensions/reference/decla...
[2]: https://requestly.io/desktop
[3]: https://github.com/requestly/requestly-proxy
[4]: https://sachinjain.hashnode.dev/the-missing-piece-in-chrome-...