Request Mocker changes network traffic in the browser without touching the backend — block requests, set or remove request and response headers, and return your own status codes, bodies and delays so you can test states the real API will not produce on demand.
Some states are painfully hard to reach. An empty dashboard needs an empty response, a retry banner needs a 500, a loading skeleton needs a slow endpoint, and a frontend needs an endpoint that does not exist yet. Normally each one means a backend change, a seeded database or a commented-out line you hope not to ship.
Request Mocker produces those states in the browser. Match a URL by substring or with wildcards, then decide what happens: block the request so the page sees a failure, rewrite request or response headers on the fly, or return a canned response with the status code, content type, body and delay of your choosing. The page cannot tell the difference, so your real error handling, empty states and timeouts all run for real.
Blocking and header rewriting use Chrome's declarativeNetRequest rules, so they apply to everything the page requests, including on reload. Faked responses are served to fetch and XMLHttpRequest from inside the page, and the panel logs each one as it is served along with a hit counter per rule, so you can see at a glance whether your rule is matching what you think it is.
Rules are deliberately easy to get rid of. They are saved per site, apply only to the current tab, and every one of them is removed the moment you close the tool — so there is no way to spend an afternoon debugging a problem that turns out to be a mock you forgot was running.
Stop a request from ever leaving, matched by URL and method, and watch how the page behaves when a script, image, tracker or API call simply never arrives.
Set or remove request and response headers — add an Authorization header, force Cache-Control: no-store, or strip a header to see what breaks — without any server change.
Serve a body you write with the status code and content type you choose. Perfect for empty lists, malformed payloads and endpoints that do not exist yet.
Return a 500, a 429 or a 404 on demand, and add a delay in milliseconds to hold the response back so loading states, spinners and timeout handling can be tested properly.
Match loosely with a fragment like /api/users, or precisely with wildcards like *.example.com/v1/*, and narrow any rule to a single HTTP method.
Rules belong to the site you created them on and apply to the current tab only. Closing the tool removes every active rule, so nothing keeps intercepting traffic behind your back.
Return an empty array for a list endpoint and see whether your UI shows a proper empty state or an awkward blank panel.
Make an endpoint return 500 or 429 on demand to check that the retry banner, toast and fallback copy all actually appear.
Mock the agreed response shape and build the whole frontend against it while the backend is still being written.
Block an analytics, chat or ad script to confirm whether it is the thing slowing the page down or breaking a layout.
Add a two-second delay to one endpoint and watch how skeletons, spinners and timeouts hold up when a single call lags.
Click the Request Mocker icon in the DevSuite Pro dock. The panel opens with a rule form on top and your saved rules for this site below it.
Pick Block request, Edit headers or Mock response, and optionally limit the rule to one method such as POST.
Enter a substring such as /api/users, or use wildcards such as *.example.com/v1/*. Choose whether the rule covers only fetch and XHR calls or every request type.
For headers, write them one per line — Name: value to set one, Name: on its own to remove it. For a mock, set the status, delay, content type and body. Click Add rule and it applies immediately.
Reload or use the page and the log shows each faked response as it is served, with a hit count beside each rule. Toggle, edit or delete rules as you go; closing the tool clears them all.
Install DevSuite Pro for free and unlock 71+ developer tools for your browser.