This article explains how to use Requestly to simulate different API status codes and test your app.
Requestly Browser Extension can simulate different status codes on an API by redirecting the actual API to a mock API.
The mock API simulating the desired status code is hit instead of the actual API. It is done using the redirect rule of requestly.
Create a mock API using Requestly
Requestly has a Mock Server capability to create a Mock API response.
Requestly mock server handles the CORS headers automatically so that the browser does not block the cross-origin requests.
Redirecting the actual API endpoint to the Mock Server endpoint.
Removing Content-Security-Policy Headers
You can use the Requestly marketplace rule to bypass this, which is a prebuilt rule to remove the
I hope this empowers you to do robust testing of your frontend by simulating different API behaviours.
This feature will soon be available on the desktop app. Stay Tuned.
Originally published at https://requestly.io.