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 :)
$ go get -u github.com/vigo/statoo
$ statoo -h
usage: statoo [-flags] URL
flags:
-version display version information (X.X.X)
-t, -timeout default timeout in seconds (default: 10)
-h, -help display help
-json provides json output
-verbose verbose output (default: false)
-header request header, multiple allowed
examples:
$ statoo "https://ugur.ozyilmazel.com"
$ statoo -timeout 30 "https://ugur.ozyilmazel.com"
$ statoo -verbose "https://ugur.ozyilmazel.com"
$ statoo -json http://vigo.io
$ statoo -header "Authorization: Bearer TOKEN" http://vigo.io
$ statoo -header "Authorization: Bearer TOKEN" -header "X-Api-Key: APIKEY" http://vigo.io
Let’s try:
$ statoo "https://ugur.ozyilmazel.com"
200
$ statoo -verbose "https://ugur.ozyilmazel.com"
https://ugur.ozyilmazel.com -> 200
or;
$ statoo -json http://vigo.io
response;
{
"url": "http://vigo.io",
"status": 200,
"checked_at": "2020-09-18T04:56:14.664255Z"
}
Now you can pass multiple -header
flags:
$ status -header "Key1: Value1" -header "Key2: Value2" "https://ugur.ozyilmazel.com"
It’s better to pipe -json
output to jq
for pretty print :)
That’s it!
- Uğur "vigo" Özyılmazel - Creator, maintainer
All PR’s are welcome!
fork
(https://github.com/vigo/statoo/fork)- Create your
branch
(git checkout -b my-feature
) commit
yours (git commit -am 'add some functionality'
)push
yourbranch
(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