Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/tmsmr/context
- Owner: tmsmr
- License: mit
- Created: 2024-01-24T18:13:54.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-24T19:23:04.000Z (12 months ago)
- Last Synced: 2024-06-21T18:11:42.741Z (7 months ago)
- Topics: debug, http, proxy, service
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
}
```