Print Header and Body of HTTP requests.
This repository contains a simple Go application that prints the headers and body of incoming HTTP requests. It is useful for debugging and inspecting HTTP requests.
- Prints HTTP request headers
- Prints HTTP request body
To install and run the application, you need to have Go installed on your system. You can download and install Go from the official website.
Clone the repository:
git clone https://github.com/jempe/printhttprequest.git
cd printhttprequest
Run the application with a specified port:
go run main.go -port=<PORT>
Replace with the port number you want the web service to run on.
Example:
go run main.go -port=8080
When you send an HTTP request to the server, the application will print the headers and body of the request.
Example:
Header:
map[Content-Length:[18] Content-Type:[application/json]]
Body:
{"key": "value"}
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.