Skip to content

multiprocessio/httpmirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

httpmirror: A single binary HTTP server that mirrors all request data (headers and body) in the response

Install

$ go install github.com/multiprocessio/httpmirror@latest

Usage

$ httpmirror 8081
2022/03/14 15:07:29 Listening on :8081

Then in another terminal:

$ curl -X POST -d '{"foo": "bar"}' -H "Content-Type: application/json" localhost:8081
POST / HTTP/1.1
Host: localhost:8081
User-Agent: curl/7.77.0
Content-Length: 14
Accept: */*
Content-Type: application/json

{"foo": "bar"}

Why?

To make integration testing easier.

About

A single binary HTTP server that mirrors all request data (headers and body) in the response

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages