The API Response Simulator Chrome Extension allows you to simulate backend APIs in order to test how your application handle API certain response.
Generally, if you want to test how frontend behaves when backend API returns 2xx, 4xx or 5xx status codes, there are two options:
- If you control the backend, you can patch your backend code and manually return 2xx/4xx/5xx status codes from API methods.
- If you don't control the backend, you can patch your frontend code with some debug statements to verify the behavior.
Neither of which is an elegant approach.
The API Response Simulator Chrome Extension allows you to map backend API endpoints to the responses you want to simulate for your application.
Internally it patches browser's native XMLHttpRequest API.
Once you've installed the extension, follow the steps to operate it:
- Click on the ! icon at right top of the browser and switch on the extension.
- Click on the OPTIONS button. It'll open a page where you can supply rules with:
- The combination of URL and HTTP verb
- The response status code
- The response value
- You can also edit/delete your rules
Note: Please ensure you turn off the extension after its use. Leaving this extension on might hijack and break your API calls due to the nature of its implementation.
Design Credit:
Name: Jainul Abedin
LinkedIn: https://www.linkedin.com/in/jainul-abedin-4148b816
Email: [email protected]
Extore is a team of professionals who are passionate about creating extensions for web browsers. This devotion also gives us opportunity to appreciate work of other people. We get inspired by useful, open source extensions made by developers all over the world. Our strong belief is that one should share helpful add-ons with others. That’s why we’d like to present you our ever-growing list of favourite extensions that have inspired us. Moreover, as you probably have already learned, sometimes struggling for the best brings an end to the good. Talking about add-ons it often turns out that an upgrade is worse then previous version. Also it can become really tricky to get back to the beloved version of your favourite extension. That’s why we’re going to make not only the latest, but all versions of our favourite (and we hope yours too) add-ons available for download. No more compromises, just stick to the version you really like!