The missing piece in Chrome DevTools
Tags: chromeextension, opensource, httpproxy, chromedevtools
Published: 2023-03-31 08:10:32

---
title: The missing piece in Chrome DevTools
published: true
date: 2023-03-31 08:00:41 UTC
tags: chromeextension, opensource, httpproxy, chromedevtools
canonical_url: https://requestly.medium.com/the-missing-piece-in-chrome-devtools-63fa6ca33df1
---

![Requestly - The missing piece in Chrome DevTools](https://cdn-images-1.medium.com/max/1024/0*I_m3IChsQMvTKduo)

Web development has come a long way since its inception, and one tool that has made a significant impact is Chrome DevTools. It has revolutionized how web developers, QAs, and backend developers develop, test & debug web apps. Today, you can’t imagine building web apps without access to Chrome Devtools. It provides complete visibility into what’s happening inside your web application, from the HTML DOM at any given point to the network requests your app fired.

Chrome DevTools also provides latency information for every API/network request, performance insights, step-by-step debugging for your source code, and an interactive console. If you are new to Chrome DevTools, [here’s a beginner’s guide to Chrome DevTools features](https://requestly.com/blog/chrome-developer-tools-a-beginners-guide/) If you’re looking to learn advanced techniques, there’s a great video-based course [ModernDevTools](https://moderndevtools.com/) by [Umar Hansa](https://hashnode.com/@umarhansa) that you can buy.

However, it’s important to note that while Chrome DevTools offers everything you need to get visibility in your web app, **it misses out on a lot of things like testing your code when an API gives 500, chrome doesn’t provide any way to override status code or even API responses.**

### Why do HTTP(s) modifications matter?

Having the ability to modify HTTP(s) requests/responses, frontend developers can reduce their dependency on the complex environment for testing their code or dependency on backend developers for API responses. Here are some of the things front-end developers can benefit from modifying HTTP(s) requests.

**👉 Loading local JS/CSS bundles directly on production sites**  
By loading locally running JS/CSS code, web developers don’t need to set up the entire site on their machine. Sometimes it isn’t even possible especially when your code is deployed on your customers’ sites.

**👉 Modifying Request & Response Headers**  
The ability to modify HTTP request & response headers unlocks numerous use cases like adding auth headers, testing content-security policy, debugging CORS issues, toggling feature flags, etc.

**👉 Stress Testing of web apps**  
Stress Testing of web apps requires your code to be tested against all API scenarios like bad/invalid responses, empty responses, big API responses, API failures, API latencies, etc. Having the ability to simulate artificial delays or make APIs & third-party scripts fail can help you in testing a lot of negative scenarios. Here’s a good Reddit thread about different methods to [simulate artificial delays](https://www.reddit.com/r/Frontend/comments/ocyr7h/test_your_web_app_experience_in_different_network/).

There are many more use cases like returning a fixed response for an API, writing frontend code when API is not ready, sending some debug query parameters, overriding script content, and testing different version of an API but the conclusion is Chrome DevTools offers very limited capability and that’s why developers have to use inefficient methods to solve these use cases.

### Introducing Requestly — Open Source HTTP(s) proxy to Intercept & Modify requests

[Requestly](https://requestly.com) is an [open-source](https://github.com/requestly/requestly) lightweight proxy available as a browser extension & [desktop app](https://requestly.com/desktop) that allows developers & QAs to Intercept & Modify network requests. Requestly is used by more than 180,000+ developers across 5000+ organizations around the globe.

![Requestly - Open Source HTTPs Proxy that runs on your local device](https://cdn-images-1.medium.com/max/1024/0*QVyxB1VNGmIiV18o)

> **_⚡️ Requestly brings the power of Charles Proxy & Fiddler into the browser without worrying about proxy, SSL & VPN-related issues._**

Requestly offers a complete suite of HTTP request & response modifications through different rule types e.g. **URL rewrites, request payload, API response body, request & response headers** , and many more using different rule types in the product.

![Different Rule Types supported in Requestly](https://cdn-images-1.medium.com/max/544/0*-xKRHqBSGerxLax_)

So, once you install Requestly, just go to the rules interface, click on Create New Rule button & select the correct rule type for your use case. On top of this, Requestly rules are synced across multiple browsers & devices and **you can collaborate with your teammates & customers in a shared workspace**. Requestly also offers a cloud-hosted **Mock Server for creating dummy mock endpoints** and a file server for hosting static files like scripts & JSON files.

### How Requestly works?

Requestly browser extension leverages [chrome webRequest API](https://developer.chrome.com/docs/extensions/reference/webRequest/) (MV2) & [chrome declarativeNetRequest API](https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/) (MV3) to provide support for most of the modifications. To override API request payload & response body, Requestly overrides native XHR & fetch objects’ prototype, and registers its own interceptor.

Requestly [desktop app](https://requestly.com/desktop) runs a local server (aka proxy) on _localhost:8171_ and provides options to connect installed browsers & mobile devices to the local proxy. The proxy module is a simple node-based mitm proxy available at — [https://github.com/requestly/requestly-proxy](https://github.com/requestly/requestly-proxy). A separate rule processor module applies the modifications defined by the user.

The complete source code is available on Github — [https://github.com/requestly/requestly](https://github.com/requestly/requestly/issues)

### Conclusion

With the continuously evolving web community, web developers also need modern tools to cater to their needs and make them more productive. Unfortunately, there are a few things that are not yet available in Chrome DevTools and that’s one of the reasons browser extensions exist. [Requestly](https://requestly.com) fills one gap in the Chrome DevTools which is modifying network requests & responses without the hassle of dealing with VPN, Proxy, or SSL issues.

_Originally published at_ [_https://sachinjain.hashnode.dev_](https://sachinjain.hashnode.dev/the-missing-piece-in-chrome-devtools)_._