A zero dependency Python 3 web server to echo back an HTTP request's headers and data.
10K+
You can view the documentation for this project here: https://github.com/nickjj/webserver
Quick guide:
# Terminal 1:
docker container run -it -p 127.0.0.1:8008:8008 nickjj/webserver
# Terminal 2:
curl localhost:8008/ \
-H "Content-Type: application/json" \
-X POST --data '{"foo":"bar"}'
# Response from the webserver in terminal 1:
127.0.0.1 - - [05/Feb/2024 20:51:33] "POST / HTTP/1.1" 200 -
Host: localhost:8008
User-Agent: curl/7.68.0
Accept: */*
Content-Type: application/json
Content-Length: 13
{"foo":"bar"}
Content type
Image
Digest
sha256:7711dfb5e…
Size
41.3 MB
Last updated
6 months ago
docker pull nickjj/webserver