This commandline application makes http requests and prints the address of the request along with the MD5 hash of the response to STDOUT.
Install Golang 1.17 or higher.
Run go install github.com/TriAnMan/http-test@latest
and cd `go env GOPATH`/bin
./http-test www.yandex.com https://google.com
Consider -parallel
parameter to control number of parallel requests (default is 10).
./http-test -parallel 3 google.com facebook.com yahoo.com yandex.com twitter.com reddit.com/r/funny reddit.com/r/notfunny baroquemusiclibrary.com
- The app exploits the fail-fast methodology.
- Streams are used to minimize a memory footprint.
- Pipelines concurrency pattern is utilized to empower the code readability and manageability.
- App logs to STDERR to facilitate log management (https://12factor.net/logs) and to separate logs from normal output.
- Parse STDIN instead of command line to overcome various OS limitations for command line environments.