|
1 | | -# tiny-requestbin |
2 | | -A tiny golang Request Bin |
| 1 | +# Tiny RequestBin |
3 | 2 |
|
4 | | -This Project is generated by Gemini, and modified by github copilot. |
| 3 | +*[English](README.md) | [简体中文](README_ZH_CN.md)* |
| 4 | + |
| 5 | +A lightweight HTTP request inspector and debugging tool written in Go. Tiny RequestBin captures and displays HTTP requests for inspection and debugging purposes. |
| 6 | + |
| 7 | +[](https://golang.org/) |
| 8 | +[](LICENSE) |
| 9 | + |
| 10 | +## Features |
| 11 | + |
| 12 | +- 🚀 **Lightweight & Fast**: Simple implementation with minimal dependencies |
| 13 | +- 🔍 **Request Inspection**: View detailed information about incoming HTTP requests |
| 14 | +- 🌐 **Web UI**: Clean interface to browse captured requests |
| 15 | +- 📋 **CLI Mode**: Option to print requests directly to the terminal |
| 16 | +- 🔒 **Local Only**: All data stays on your machine, no external services needed |
| 17 | + |
| 18 | +## Installation |
| 19 | + |
| 20 | +### Option 1: Install using `go install` |
| 21 | + |
| 22 | +```bash |
| 23 | +go install github.com/knktc/tiny-requestbin@latest |
| 24 | +``` |
| 25 | + |
| 26 | +### Option 2: Build from source |
| 27 | + |
| 28 | +```bash |
| 29 | +git clone https://github.com/knktc/tiny-requestbin.git |
| 30 | +cd tiny-requestbin |
| 31 | +go build |
| 32 | +``` |
| 33 | + |
| 34 | +## Usage |
| 35 | + |
| 36 | +Start the server with default options: |
| 37 | + |
| 38 | +```bash |
| 39 | +tiny-requestbin |
| 40 | +``` |
| 41 | + |
| 42 | +### Command-line Options |
| 43 | + |
| 44 | +- `-port`: Port for the server to listen on (default: 8080) |
| 45 | +- `-listen`: Address to listen on (default: 127.0.0.1) |
| 46 | +- `-max`: Maximum number of requests to store (default: 100) |
| 47 | +- `-cli`: Enable CLI mode to print requests to terminal (default: false) |
| 48 | + |
| 49 | +Example with custom options: |
| 50 | + |
| 51 | +```bash |
| 52 | +tiny-requestbin -port 9000 -listen 0.0.0.0 -max 1000 -cli |
| 53 | +``` |
| 54 | + |
| 55 | +## How It Works |
| 56 | + |
| 57 | +1. Start the server using one of the methods above |
| 58 | +2. Send HTTP requests to `http://[listen-address]:[port]/any/path` |
| 59 | +3. View captured requests in your browser at `http://[listen-address]:[port]/` |
| 60 | +4. If CLI mode is enabled, requests will also be printed to the terminal |
| 61 | + |
| 62 | +## Screenshots |
| 63 | + |
| 64 | +*(You may add screenshots here)* |
| 65 | + |
| 66 | +## Contributing |
| 67 | + |
| 68 | +Contributions are welcome! Feel free to submit a Pull Request. |
| 69 | + |
| 70 | +## License |
| 71 | + |
| 72 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
0 commit comments