curl statistics made simple.
httpstat is a single file🌟 Python script that has no dependency👏 and is compatible with Python 3🍻.
Be sure to check @davecheney's implementation: davecheney/httpstat which is purely written in Go. Not like this one, it's absolutely independent, could be run even you don't have
curl(1)orpython(1)!
There are three ways to get httpstat:
-
Download the script directly:
wget https://raw.githubusercontent.com/reorx/httpstat/master/httpstat.py -
Install through pip:
pip install httpstat -
Install through homebrew (macOS only):
brew install httpstat
Just pass a url with it:
python httpstat.py httpbin.org/getIf installed through pip or brew, you can use
httpstatas a command instead ofpython httpstat.py.
By default it will write response body in a tempfile, but you can let it print out by setting HTTPSTAT_SHOW_BODY=true:
HTTPSTAT_SHOW_BODY=true python httpstat.py httpbin.org/getYou can pass any curl supported arguments after the url (except for -w, -D, -o, -s, -S which are already used by httpstat):
HTTPSTAT_SHOW_BODY=true python httpstat.py httpbin.org/post -X POST --data-urlencode "a=中文" -v