Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tmsmr/context

Minimal HTTP service that dumps the request context as JSON response
https://github.com/tmsmr/context

debug http proxy service

Last synced: 2 months ago
JSON representation

Minimal HTTP service that dumps the request context as JSON response

Awesome Lists containing this project

README

        

# context
*Minimal HTTP service that dumps the request context as JSON response*

## Get `context`
- `$ go install github.com/tmsmr/context@latest`, or
- `$ docker pull ghcr.io/tmsmr/context:latest`

## Use `context`
- `$ context [-e]`, or
- `$ docker run --rm -p 8080:8080 ghcr.io/tmsmr/context:latest [-e]`

*With the `-e` flag set, the response also contains environment variables*

## Example
```bash
curl "localhost:8080/a/b?a=1&b=2" | jq
{
"host": "localhost:8080",
"headers": {
"Accept": [
"*/*"
],
"User-Agent": [
"curl/8.4.0"
]
},
"path": "/a/b",
"query": {
"a": "1",
"b": "2"
},
"env": null
}
```