โก XApi HTTP Client
June 15, 2026 ยท View on GitHub
Professional HTTP Debugging & Replay Tool for Chrome
XApi is a high-performance, open-source Chrome Extension (Manifest V3) that brings a powerful, Postman-like experience directly into your browser's DevTools. It specializes in intercepting, debugging, editing, and replaying HTTP requests with unique support for modifying sensitive headers like Cookie and Origin.
๐ธ Overview
Debug directly while you browse without switching tabs. Manage collections and complex requests in a dedicated window.
https://github.com/user-attachments/assets/490f58f6-b000-49de-80e1-702669052b55
โจ Key Features
- ๐ Real-time Interception: Automatically capture Fetch and XHR traffic from the active tab.
- ๐ก๏ธ Sensitive Header Injection: Industry-leading support for overriding
Cookie,Origin, andRefererusingdeclarativeNetRequest(DNR) to bypass standard browser security blocks. - ๐ Collection Management: Organize your workspace with nested collections and persistent storage.
- ๐ Smart Replay: One-click "Send" to replay captured requests with modified parameters or headers.
- ๐ฅ cURL Integration: Paste raw cURL commands to instantly generate fully editable request objects.
- ๐ญ Mock & Response Override: Intercept live requests and serve custom responses without touching the backend โ ideal for front-end development, edge-case testing, and reproducing bugs.
- URL Matching: Rules match by URL prefix (
startsWith) and HTTP method (GET/POST/PUT/DELETE/ANY). - Two Modes:
- Replace โ fully override the response with a custom status code,
Content-Type, and body (JSON, text, HTML, etc.). - JSON Patch โ keep the original response and surgically modify specific fields via JSON paths (e.g.
data.user.name,data.list[0].id); use the::raw::prefix to inject numbers, booleans,null, or nested JSON.
- Replace โ fully override the response with a custom status code,
- One-click Mock from Capture: Right-click any captured response and choose "Mock this response" to auto-generate a rule pre-filled with the current payload โ start tweaking immediately.
- Per-Rule Toggle & Global Switch: Enable/disable individual rules or flip the global mock master switch from the sidebar; hit counters and last-hit timestamps help you verify rules are firing.
- URL Matching: Rules match by URL prefix (
๐ ๏ธ Tech Stack
- Framework: React 19
- Styling: Tailwind CSS
- Build Tool: Vite
- Language: TypeScript
- Core Engine: Chrome Extensions API (Manifest V3 + DNR)
๐ Getting Started
Installation
1. Via Chrome Web Store (Recommended)
XApi is available on the Chrome Web Store. You can search for XApi directly or use the link below:
- Store Link: XApi - HTTP Client & API Test
2. Manual Installation (From Source)
If you prefer to build the extension manually for development purposes:
- Clone & Build:
git clone https://github.com/lustan/XApi.git cd XApi npm install npm run build - Load in Chrome:
- Go to
chrome://extensions/ - Enable Developer mode (top right)
- Click Load unpacked and select the
distfolder.
- Go to
How to Use
- Open Chrome DevTools (
F12orCtrl+Shift+I). - Switch to the XApi tab.
- Interactions on the current page will appear in the Captured history.
- Select any request to edit its body, headers, or query params and hit SEND.
Mocking a Response
- Open the Mock tab in the sidebar and make sure the global mock switch is ON.
- Click New Rule to define one from scratch, or right-click a captured response and pick "Mock this response" to seed a rule from the live payload.
- Set the URL pattern (prefix match) and method, then choose a mode:
- Replace โ write the full status /
Content-Type/ body you want returned. - JSON Patch โ add patch rows like
data.user.name = Alice. Prefix with::raw::to inject non-string JSON values, e.g.::raw::42,::raw::true,::raw::{"k":1}.
- Replace โ write the full status /
- Reload the page or trigger the request โ the rule's hit counter confirms it fired.
๐ค Contributing
We love contributions! Whether it's a bug report, a feature request, or a pull request, we value your input.
- Fork the project.
- Create your feature branch (
git checkout -b feature/CoolFeature). - Commit your changes (
git commit -m 'Add CoolFeature'). - Push to the branch (
git push origin feature/CoolFeature). - Open a Pull Request.
๐ License
Distributed under the Apache 2.0 License. See LICENSE for details.
Made with โค๏ธ by the XApi Team