Skip to content

Latest commit

 

History

History
50 lines (41 loc) · 1.12 KB

README.md

File metadata and controls

50 lines (41 loc) · 1.12 KB

echoer

Actions Status image metadata

Simple http server which echoes HTTP requests.

Usage

Automatically built image.

docker run -p 80:80 kamko/echoer

Configuration

via env vars (shown values are defaults)

PORT=80
BODY_AS_STRING=TRUE

Example

{
  "body": "{\n\t\"value1\": \"ABC\"\n}",
  "headers": {
    "Accept": "*/*",
    "Content-Length": "20",
    "User-Agent": "insomnia/7.0.6"
  },
  "uri": "/?param1=1&param2=2"
}

When BODY_AS_STRING is set to false the body is returned as base64 string.

{
  "body": "ewoJInZhbHVlMSI6ICJBQkMiCn0=",
  "headers": {
    "Accept": "*/*",
    "Content-Length": "20",
    "User-Agent": "insomnia/7.0.6"
  },
  "uri": "/?param1=1&param2=2"
}

Build with

  • go 1.13.5 with Echo

License

MIT