When developing a new version of an API that's meant to replace an existing one, you may need to test the new API using the live URL to ensure proper functionality. However, if the path signatures of the new API are different from the existing one, using /etc/hosts
to redirect the calls won't be sufficient. In this article, we will demonstrate how to use mitmproxy to redirect API calls from the live URL to your localhost, allowing you to test the new API with different path signatures.
Before we begin, make sure you have the following software installed: