Skip to content

Add REST API Tester Chrome Extension with Manifest V3#1

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/add-rest-api-testing-extension
Draft

Add REST API Tester Chrome Extension with Manifest V3#1
Copilot wants to merge 3 commits into
mainfrom
copilot/add-rest-api-testing-extension

Conversation

Copy link
Copy Markdown

Copilot AI commented Nov 25, 2025

Implements a lightweight Chrome extension for testing REST API endpoints directly from the browser using Manifest V3, vanilla JavaScript, Chrome Storage API, and Fetch API.

Extension Structure

  • manifest.json - MV3 config with storage/host permissions, service worker, popup action
  • background.js - Service worker managing popup window lifecycle
  • popup.html/css/js - Request builder UI with response viewer

Features

  • HTTP methods: GET, POST, PUT, PATCH, DELETE
  • Body formats: JSON, Form Data (toggle)
  • Custom headers with add/remove
  • Formatted JSON responses with syntax highlighting
  • Status codes with color-coded badges + response timing
  • Endpoint persistence via Chrome Storage API

Security

  • XSS prevention: textContent for plain text responses, HTML escaping in JSON formatter
  • Try-catch for malformed JSON response handling
// Safe response handling
if (isFormattedJson) {
  responseContent.innerHTML = responseText; // Pre-escaped in formatJSON
} else {
  responseContent.textContent = responseText; // Prevents XSS
}
Original prompt

Lightweight browser extension that lets allows me devs to test REST API endpoints directly from the browser. Tech Stack: 1. Manifest V3 Chrome extension 2. Vanilla Javascript (no frameworks) Chrome Storage API for storing endpoints. Fetch API for HTTP requests. Architecture: Manifest.json - Extension configuration 2. Background.js - Service worker for window management. 3. popup.html/css/js - Main UI with request builder and response viewer. Opens as a persistent window.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 25, 2025 14:17
Co-authored-by: freddycodes23 <123166882+freddycodes23@users.noreply.github.com>
Co-authored-by: freddycodes23 <123166882+freddycodes23@users.noreply.github.com>
Copilot AI changed the title [WIP] Add lightweight browser extension for testing REST API endpoints Add REST API Tester Chrome Extension with Manifest V3 Nov 25, 2025
Copilot AI requested a review from freddycodes23 November 25, 2025 14:21
Repository owner locked as too heated and limited conversation to collaborators Nov 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants