Intercepting and Modifying API Requests and Responses without Code Alterations | May 16 2024, 13:40

I published a new article on my hybrismart. Just imagine, you have a website (frontend + backend) and they are exchanging requests, and you want to change a request on the fly — the parameters or even the JSON that is sent or received from the server back to the browser, all without altering the website’s code. Theoretically, the site might not even be yours 🙂 The reasons can vary — perhaps to test a concept before asking developers to implement it properly, to swap the actual response with a template one, to enable debugging through some debug parameter, to simulate an erroneous/invalid API response, or to remove or alternatively set some headers. For all of this, there isn’t a straightforward free solution “out of the box.” I had to create one myself. The article includes analysis and code that can be used.

https://hybrismart.com/2024/05/16/how-to-inject-custom-logic-to-intercept-and-modify-api-requests-and-responses-without-touching-frontend-backend-code/

Leave a comment