Mendhak / Code

An https echo Docker container for web debugging

I’ve often had to test various aspects of web requests such as whether the right headers, querystrings, body, methods, etc. were being passed correctly.

Docker image that echoes request data as JSON; listens on HTTP/S, useful for debugging.

This Docker image echoes various HTTP request properties back to client, as well as in docker logs. An https connection is also available. There are a lot of features available, see the repo for more details.

How to use it

You can get started quickly with just this command

docker run -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo

This will bring up the image and start listening (quietly) on port 8080 for http and 8443 for https. You can substitute with your own ports.

Once the container is up, issue a request via your browser or curl -

curl -k -X PUT -H "Arbitrary:Header" -d aaa=bbb https://localhost:8443/hello-world
curl and browser output

You can also see the request appear in the docker logs

Docker log output

Features

The image comes with extra parameters or headers that can be passed in for various functionality.

Details on using these features are in the README.

More info