Returns any HTTP status code you want, as a simple http server
750
Returns any HTTP status code you want, as a simple http server
$ docker run -p 1500:1500 \
-e RESPONSE_HTTP_STATUS_CODE=503 \
-e LISTEN_PORT=1500 \
toricls/http-hey-yo
then, you'll see a simple HTTP server launched.
2020-08-13T09:11:22+0000 RESPONSE_HTTP_STATUS_CODE: 503
2020-08-13T09:11:22+0000 LISTEN_PORT : 1500
2020-08-13T09:11:22+0000 HTTP server being ready
Let's curl it.
$ curl -i http://localhost:1500
HTTP/1.1 503 Service Unavailable
2020-08-13T08:58:39+0000 Hey, Yo!
$ curl -i http://localhost:1500/meaninglesspath
HTTP/1.1 503 Service Unavailable
2020-08-13T08:59:04+0000 Hey, Yo!
RESPONSE_HTTP_STATUS_CODEThe default value is 200. Set this value to change the HTTP response status code of http-hey-yo.
LISTEN_PORTThe default value is 8080. Set this value to change the listen port number of http-hey-yo.
$ docker build -t YOUR-NAME/http-hey-yo .
$ docker push YOUR-NAME/http-hey-yo
Content type
Image
Digest
sha256:8b1848094…
Size
2.1 MB
Last updated
over 2 years ago
docker pull toricls/http-hey-yo