Skip to content

PrintHTTPRequest A lightweight Go application for debugging HTTP requests by printing their headers and body.

Notifications You must be signed in to change notification settings

jempe/printhttprequest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

PrintHTTPRequest

Print Header and Body of HTTP requests.

Description

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.

Features

  • Prints HTTP request headers
  • Prints HTTP request body

Installation

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

Usage

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

Example Output

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"}

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

About

PrintHTTPRequest A lightweight Go application for debugging HTTP requests by printing their headers and body.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages