Sign inSign up

sha1n/hako

By sha1n

•Updated over 5 years ago

A simple echo server utility designed primarily to be used as a CLI based development utility

Image
0

300

sha1n/hako repository overview

Full documentation on github pages⁠

⁠Pulling a Public Docker Image

docker pull sha1n/hako

# you can then start the server using 
docker run sha1n/hako
# or with custom arguments 
docker run -p 8090:8080 sha1n/hako /bin/sh -c "/opt/hako start --path /echo/shmecho --delay 1 --verbose --verbose-headers"

⁠Example:

Terminal A

docker run -p 8090:8080 sha1n/hako /bin/sh -c "/opt/hako start --path /echo/shmecho --delay 1 --verbose --verbose-headers"

[HAKO] 2021/05/24 13:14:03 Registering signal listeners for graceful HTTP server shutdown..
[HAKO] 2021/05/24 13:14:03 Staring HTTP Server on :8080
[HAKO] 2021/05/24 13:14:03 Waiting for shutdown signal...
[HAKO] 2021/05/24 13:14:40 Handling request at /echo/shmecho
[HAKO] 2021/05/24 13:14:40 Received headers:

User-Agent : curl/7.64.1
Accept : */*
Content-Type : application/json
Content-Length : 18

[HAKO] 2021/05/24 13:14:40 Received body:

{'Hello': 'World'}

[HAKO] 2021/05/24 13:14:40 Delaying response in 1 millis
[GIN] 2021/05/24 - 13:14:40 | 200 |    1.486425ms |      172.17.0.1 | POST     "/echo/shmecho"

Terminal B

curl -X POST localhost:8090/echo/shmecho -H "Content-Type: application/json" --data "{'Hello': 'World'}"

Tag summary

Content type

Image

Digest

Size

9.1 MB

Last updated

over 5 years ago

docker pull sha1n/hako