A Minimalist Web‑Based API Debugger That Could Replace Postman

WebCurl is an open‑source, ultra‑lightweight web API testing tool that runs entirely in the browser without any installation, offering a minimalist design, zero third‑party dependencies, and a rich set of features such as HTTP CONNECT tunneling, custom headers, file upload/download, echo server, static file serving, and flexible command‑line options.

Java Companion
Java Companion
Java Companion
A Minimalist Web‑Based API Debugger That Could Replace Postman

Introduction

WebCurl is an open‑source, web‑based HTTP request debugging tool that runs directly in a browser without installation, targeting fast API testing in modern development environments.

Technical Architecture

Frontend: Pure native HTML, JavaScript and CSS with no third‑party libraries, providing minimal load time and high efficiency.

Backend: Implemented solely with the Go standard library, avoiding external dependencies for security and reliability.

Code size: The project consists of only two files, index.html and main.go, making the codebase easy to understand and maintain.

Binary size: A single compiled binary of about 14 MB bundles the frontend, achieving a “compile once, run everywhere” cross‑platform experience.

Core Features

Web‑based Postman‑like UI that requires no client installation.

Support for HTTP CONNECT proxy tunnels, usable with curl, ssh, ncat and similar tools.

Arbitrary request‑header configuration.

Multiple file upload and direct download of response bodies.

Configurable retry count, retry interval and request timeout.

Optional SSL certificate verification and automatic redirect following.

API management features: request history, collections, variable substitution, global headers, import/export.

Command‑line flexibility: custom listen address, port, static directory, logging, SSL certificates, etc.

Single binary of roughly 10 MB, easy to deploy and migrate.

No external services such as databases are required.

Cross‑platform and compatible with domestic hardware, suitable for intranet or offline environments.

Full IPv4 and IPv6 support.

Preliminary support for WebSocket and Server‑Sent Events (SSE) for real‑time communication.

EchoServer Debug Service

Intelligent request echo that parses and returns URL, method, headers and body (text, form, file, binary).

Flexible response control via custom request headers or URL parameters.

Multiple response formats: JSON, XML, plain text, etc.

Configurable response delay to simulate network latency.

Ability to send response content as a downloadable file.

Streaming support through SSE and WebSocket interfaces.

Custom data queues allow overriding default response data for adaptive streaming.

Built‑in panic recovery prevents service crashes.

Static File Server

Full static file serving comparable to Nginx, handling all common file types.

Rich MIME detection for HTML, CSS, JS, images, audio, video, fonts and more.

Path‑traversal protection ensures safe file access.

High‑performance large‑file transfer with built‑in storage control.

CORS support enables cross‑origin resource sharing for front‑end development.

Responsive design works on mobile devices.

Utility Tools

One‑click JWT parsing to view payloads.

Standard UUID generation.

Millisecond/second ↔ date‑time conversion.

Base64 encode/decode for binary and text data.

Customizable random token generator for mock login scenarios.

Quick Start

Installation & Run

# Build (if you prefer to compile)
go build -o WebCurl main.go
# Or use the provided script
sh build.sh

# Run (default 0.0.0.0:4444, includes embedded frontend)
./WebCurl

# Access via browser
http://localhost:4444

Command‑Line Options

-p

: specify listening port -d: set static file directory -s: enable HTTPS mode -c: path to SSL certificate

Example to run on port 9000 with HTTPS:

./webcurl -p 9000 -s -c /path/to/cert

Open‑Source Repository

https://github.com/o8oo8o/WebCurl
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Golangopen-sourceAPI testingHTTP debugginglightweightWebCurl
Java Companion
Written by

Java Companion

A highly professional Java public account

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.