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: 8 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 (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-24T19:23:04.000Z (almost 2 years ago)
- Last Synced: 2025-01-22T03:24:30.166Z (9 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
}
```