https://github.com/multiprocessio/httpmirror
A single binary HTTP server that mirrors all request data (headers and body) in the response
https://github.com/multiprocessio/httpmirror
Last synced: 5 months ago
JSON representation
A single binary HTTP server that mirrors all request data (headers and body) in the response
- Host: GitHub
- URL: https://github.com/multiprocessio/httpmirror
- Owner: multiprocessio
- License: other
- Created: 2022-03-14T19:04:35.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-09T13:13:50.000Z (almost 2 years ago)
- Last Synced: 2024-06-20T05:05:05.707Z (10 months ago)
- Language: Go
- Size: 3.91 KB
- Stars: 19
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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.