A super basic http tool that makes only GET request to given URL and returns
status code of the response. Well, if you are curl or http (httpie) user,
you can make the same kind of request and get a kind-of same response since
statoo is way better simple :)
statoo injects Accept-Encoding: gzip request header to every http request!
You can install from the source;
$ go get github.com/vigo/statooor, you can install from brew:
$ brew tap vigo/statoo
$ brew install statoo$ statoo -h
usage: ./statoo [-flags] URL
flags:
-version display version information (X.X.X)
-verbose verbose output (default: false)
-header request header, multiple allowed
-t, -timeout default timeout in seconds (default: 10)
-h, -help display help
-j, -json provides json output
-f, -find find text in response body if -json is set
-a, -auth basic auth "username:password"
examples:
$ ./statoo "https://ugur.ozyilmazel.com"
$ ./statoo -timeout 30 "https://ugur.ozyilmazel.com"
$ ./statoo -verbose "https://ugur.ozyilmazel.com"
$ ./statoo -json https://vigo.io
$ ./statoo -json -find "python" https://vigo.io
$ ./statoo -header "Authorization: Bearer TOKEN" https://vigo.io
$ ./statoo -header "Authorization: Bearer TOKEN" -header "X-Api-Key: APIKEY" https://vigo.io
$ ./statoo -json -find "Meetup organization" https://vigo.io
$ ./statoo -auth "user:secret" https://vigo.ioLet’s try:
$ statoo "https://ugur.ozyilmazel.com"
200
$ statoo -verbose "https://ugur.ozyilmazel.com"
https://ugur.ozyilmazel.com -> 200or;
$ statoo -json https://vigo.ioresponse;
{
"url": "https://vigo.io",
"status": 200,
"checked_at": "2021-05-13T18:09:26.342012Z",
"elapsed": 210.587871,
"length": 1453
}elapsedrepresents response is in milliseconds.lengthrepresents response size in bytes (gzipped)
Let’s find text inside of the response body. This feature is only available
if the -json flag is set!
$ statoo -json -find "Meetup organization" https://vigo.io
{
"url": "https://vigo.io",
"status": 200,
"checked_at": "2021-05-13T18:10:38.196705Z",
"elapsed": 183.128016,
"length": 1453,
"find": "Meetup organization",
"found": true
}
$ statoo -json -find "meetup organization" https://vigo.io # case sensitive
{
"url": "https://vigo.io",
"status": 200,
"checked_at": "2021-05-13T18:10:58.100932Z",
"elapsed": 189.403753,
"length": 1453,
"find": "meetup organization",
"found": false
}You can add basic authentication via -auth flag
$ statoo -auth "username:password" https://your.basic.auth.urlNow you can pass multiple -header flags:
$ statoo -header "Key1: Value1" -header "Key2: Value2" "https://ugur.ozyilmazel.com"It’s better to pipe -json output to jq or python -m json.tool for pretty print :)
That’s it!
Bash completions is available via;
$ eval "$(statoo bash-completion)"$ rake -T
rake default # show avaliable tasks (default task)
rake docker:build # Build
rake docker:rmi # Delete image
rake docker:run # Run
rake release[revision] # Release new version major,minor,patch, default: patch
rake test:run[verbose] # run tests, generate coverage
rake test:show_coverage # show coverage after running tests
rake test:update_coverage # update coverage value in READMEbuild:
$ docker build . -t statoorun:
$ docker run -i -t statoo:latest statoo -h
$ docker run -i -t statoo:latest statoo -json -find "Meetup organization" https://vigo.io- Uğur "vigo" Özyılmazel - Creator, maintainer
- Erman İmer - Contributor
All PR’s are welcome!
fork(https://github.com/vigo/statoo/fork)- Create your
branch(git checkout -b my-feature) commityours (git commit -am 'add some functionality')pushyourbranch(git push origin my-feature)- Than create a new Pull Request!
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
This project is licensed under MIT