Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/soorajshankar/tapreq
https://github.com/soorajshankar/tapreq
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/soorajshankar/tapreq
- Owner: soorajshankar
- Created: 2024-07-16T11:44:53.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-17T07:55:25.000Z (5 months ago)
- Last Synced: 2024-09-19T02:45:32.116Z (3 months ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tapreq
A simple, fast HTTP proxy that logs requests and responses. Perfect for debugging and monitoring HTTP traffic.
## Features
- Easy to use CLI interface
- Proxies HTTP requests to a specified target
- Logs all requests and responses
- Option to save logs to a file
- Includes UTC timestamps for all log entries## Installation
You can use `tapreq` without installation via `npx`, or install it globally:
```bash
npm install -g tapreq
```## Usage
### Using npx (no installation required):
```bash
npx tapreq [--port ] [--log-file ]
```### If installed globally:
```bash
tapreq [--port ] [--log-file ]
```### Arguments:
- ``: The URL to proxy requests to (required)
- `--port `: The port to run the proxy server on (default: 8082)
- `--log-file `: File to write logs to (optional)## Examples
Proxy requests to http://localhost:3000 and log to console:
```bash
npx tapreq http://localhost:3000
```Proxy requests to https://api.example.com on port 8000 and log to a file:
```bash
npx tapreq https://api.example.com --port 8000 --log-file proxy.log
```## Log Format
Logs include UTC timestamps and are formatted as follows:
```
[] Request:
[] Response:
[]
```## Use Cases
- Debugging API requests and responses
- Monitoring HTTP traffic
- Testing webhooks
- Educational purposes to understand HTTP requests## License
MIT
## Contributing
Contributions, issues, and feature requests are welcome! Feel free to check [issues page](https://github.com/soorajshankar/tapreq/issues).
## Support
If you found this project helpful, please give it a ⭐️!