This is a simple HTTP server written in Go that logs all incoming requests with details including timestamp, path, headers, and payload. It's useful for debugging callbacks and webhooks.
- Logs the request path, headers, and body.
- Adds a timestamp to each request log.
- Configurable port via command-line arguments.
- Go 1.16 or later
Clone the repository:
git clone https://github.com/klausbreyer/all-the-requests.git
cd all-the-requests
Build and run the server:
go build -o all-the-requests
./all-the-requests -port=8080
By default, the server listens on port 8080. You can specify a different port using the -port
flag.
Start the server:
./all-the-requests -port=9090
Output:
Starting server on :9090
Server is ready to handle requests and display all details.
Make a request to the server:
curl -X POST http://localhost:9090 -d "test payload" -H "Content-Type: text/plain"
The server logs:
--------------------------------------------------
Timestamp: 2024-06-11T13:52:33+02:00
Method: POST
Path: /
Headers:
User-Agent: curl/8.6.0
Accept: */*
Content-Type: text/plain
Content-Length: 12
--------------------------------------------------
Payload: test payload
--------------------------------------------------
You can download the (unsigned) binaries here.
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Go for the programming language.