Skip to content

Commit 4fd08ea

Browse files
author
tomwang
committed
update readme
1 parent 4357d45 commit 4fd08ea

2 files changed

Lines changed: 143 additions & 3 deletions

File tree

README.md

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,72 @@
1-
# tiny-requestbin
2-
A tiny golang Request Bin
1+
# Tiny RequestBin
32

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+
[![Go Version](https://img.shields.io/github/go-mod/go-version/knktc/tiny-requestbin)](https://golang.org/)
8+
[![License](https://img.shields.io/github/license/knktc/tiny-requestbin)](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.

README_ZH_CN.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Tiny RequestBin
2+
3+
*[English](README.md) | [简体中文](README_ZH_CN.md)*
4+
5+
Tiny RequestBin 是一个用 Go 语言编写的轻量级 HTTP 请求检查和调试工具。它可以捕获并显示 HTTP 请求,便于检查和调试。
6+
7+
[![Go Version](https://img.shields.io/github/go-mod/go-version/knktc/tiny-requestbin)](https://golang.org/)
8+
[![License](https://img.shields.io/github/license/knktc/tiny-requestbin)](LICENSE)
9+
10+
## 特性
11+
12+
- 🚀 **轻量且快速**:简单实现,最小依赖
13+
- 🔍 **请求检查**:查看传入的 HTTP 请求的详细信息
14+
- 🌐 **Web 界面**:干净的界面浏览捕获的请求
15+
- 📋 **CLI 模式**:可选择直接在终端打印请求
16+
- 🔒 **本地运行**:所有数据都保留在您的机器上,无需外部服务
17+
18+
## 安装
19+
20+
### 方式一:使用 `go install` 安装
21+
22+
```bash
23+
go install github.com/knktc/tiny-requestbin@latest
24+
```
25+
26+
### 方式二:从源码构建
27+
28+
```bash
29+
git clone https://github.com/knktc/tiny-requestbin.git
30+
cd tiny-requestbin
31+
go build
32+
```
33+
34+
## 使用方法
35+
36+
使用默认选项启动服务器:
37+
38+
```bash
39+
tiny-requestbin
40+
```
41+
42+
### 命令行选项
43+
44+
- `-port`:服务器监听的端口(默认:8080)
45+
- `-listen`:服务器监听的地址(默认:127.0.0.1)
46+
- `-max`:最大存储的请求数量(默认:100)
47+
- `-cli`:启用 CLI 模式,在终端打印请求(默认:false)
48+
49+
自定义选项示例:
50+
51+
```bash
52+
tiny-requestbin -port 9000 -listen 0.0.0.0 -max 1000 -cli
53+
```
54+
55+
## 工作原理
56+
57+
1. 使用上述方法之一启动服务器
58+
2.`http://[监听地址]:[端口]/任意/路径` 发送 HTTP 请求
59+
3. 在浏览器中访问 `http://[监听地址]:[端口]/` 查看捕获的请求
60+
4. 如果启用了 CLI 模式,请求也会打印到终端
61+
62+
## 截图
63+
64+
*(您可以在此处添加截图)*
65+
66+
## 贡献
67+
68+
欢迎贡献!请随时提交 Pull Request。
69+
70+
## 许可证
71+
72+
该项目采用 MIT 许可证 - 详情请参见 [LICENSE](LICENSE) 文件。

0 commit comments

Comments
 (0)