Simulate Fake response status codes using Requestly

This article will take you through how to use Requestly to simulate fake 404 and 500 response status codes and test your frontend app without changing anything in your codebase. You can use both Requestly’s Desktop app and browser extension.

Simulating Fake Responses Status Codes

  1. Go to Requestly’s Rule Selector.
  2. Select Modify Response.
  3. Define the exact URL (or Pattern) and the status code.
  4. Click Save.

Here’s a step-by-step video demo explaining the same.

Removing Content-Security-Policy Headers

Sometimes redirection to mock API won’t work due to the Content-Security-Policy connect-src directive, which restricts the URLs loaded using script interfaces.

You can bypass the content-security-policy header using Requestly’s built-in template.

This empowers you to test your frontend app/website robustly by simulating different API behaviors.

We regularly share tips and tricks on using Requestly to fast-track your web debugging process effectively. Do follow us on Twitter & Medium to stay tuned for updates.

Happy Debugging!

Share this article:

Subscribe to our weekly newsletter !

Join 10k developers and QAs to get weekly updates with Requestly's newsletter.​

This article was written by:

Picture of Sagar Soni

Sagar Soni

Sagar is the co-founder and CTO of Requestly. When he's not busy architecting the next big thing in software development, you'll likely find him behind the wheel, cruising the streets and enjoying the thrill of the drive. For Sagar, it's all about the code by day and the open road by night.

Join 10k developers and get weekly updates with Requestly's newsletter.

Contents