Urgent.News

What's breaking now, across thousands of outlets.

Tech

I Built a Chrome DevTools Extension to Mock APIs Without Leaving the Browser

Every frontend developer knows this pain: the backend isn't ready, it's down, or it returns data that doesn't match the design. You need to build UI against an API that doesn't exist yet. The usual workarounds all have friction: Spin up a mock server (json-server, mockoon) — another process, another port, another config to maintain. Use a proxy tool — powerful, but heavy setup for a quick "give…

Frontend developers often face the challenge of building UI against APIs that haven't been developed yet. The usual solutions, like creating a mock server or editing code, are often cumbersome. To address this issue, the developer created Mokup, a Chrome DevTools extension that captures live API requests and converts them into editable mock rules.

To use Mokup, install it from the Chrome Web Store and enable recording in the DevTools. As you interact with your app, requests will appear in the Live tab with details such as method, URL, status, type, and timing. By clicking Create Mock on any request, you can edit the response body and toggle the rule on. The mocked requests are logged back to the Live tab, allowing you to see what was intercepted and enabling/disable rules globally or per-rule.

Mokup leverages the DevTools you're already using, so there's no need to open another tool or change your workflow. It's installed only when the panel is open, and mock rules and captured data stay local, ensuring no data is sent to any server. The extension is available in a free plan, allowing up to 3 mock rules, or a Pro license with unlimited rules.

However, Mokup currently only intercepts fetch and XHR requests, not navigation requests, WebSockets, or binary responses. If you decide to give Mokup a try, provide feedback, especially on the capture and mock-rule workflow. The biggest pain point in your current API mocking setup?

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

GitHub Project :Understanding git work flow

INTRODUCTION My first week at LuxDev Academy as a beginner in the tech field was awesome since all tutors gave us hands on tutoring , we covered installation of apps and understanding coding…

Building an HTTP Server From Scratch using TCP.

HTTP is something I interact with every single day, whether I am fetching data on the frontend or building backend APIs. But for a long time, if you had asked me how it actually worked under the hood…

More from Sunday 23 August →