Package: httpstat
httpstathttpstat visualizescurl(1)statistics in a way of beauty and clarity.It is asingle file🌟Python script that hasno dependency👏and is compatible withPython 3🍻.InstallationThere are three ways to gethttpstat:Download the script directly:wget https://raw.githubusercontent.com/reorx/httpstat/master/httpstat.pyThrough pip:pip install httpstatThrough homebrew (macOS only):brew install httpstatFor Windows users, @davecheney'sGo versionis suggested. →download linkUsageSimply:pythonhttpstat.pyhttpbin.org/getIf installed through pip or brew, you can usehttpstatas a command:httpstathttpbin.org/getcURL OptionsBecausehttpstatis a wrapper of cURL, you can pass any cURL supported option after the url (except for-w,-D,-o,-s,-Swhich are already used byhttpstat):httpstathttpbin.org/post-XPOST--data-urlencode"a=b"-vEnvironment Variableshttpstathas a bunch of environment variables to control its behavior.
Here are some usage demos, you can also runhttpstat --helpto see full explanation.HTTPSTAT_SHOW_BODYSet totrueto show response body in the output, note that body length
is limited to 1023 bytes, will be truncated if exceeds. Default isfalse.HTTPSTAT_SHOW_IPBy default httpstat shows remote and local IP/port address.
Set tofalseto disable this feature. Default istrue.HTTPSTAT_SHOW_SPEEDSet totrueto show download and upload speed.  Default isfalse.HTTPSTAT_SHOW_SPEED=truehttpstathttp://cachefly.cachefly.net/10mb.test

...
speed_download:3193.3KiB/s,speed_upload:0.0KiB/sHTTPSTAT_SAVE_BODYBy default httpstat stores body in a tmp file,
set tofalseto disable this feature. Default istrueHTTPSTAT_CURL_BINIndicate the cURL bin path to use. Default iscurlfrom current shell $PATH.This exampe uses brew installed cURL to make HTTP2 request:HTTPSTAT_CURL_BIN=/usr/local/Cellar/curl/7.50.3/bin/curlhttpstathttps://http2.akamai.com/--http2

HTTP/2200...cURL must be compiled with nghttp2 to enable http2 feature
(#12).HTTPSTAT_METRICS_ONLYIf set totrue, httpstat will only output metrics in json format,
this is useful if you want to parse the data instead of reading it.HTTPSTAT_DEBUGSet totrueto see debugging logs. Default isfalseFor convenience, you can export these environments in your.zshrcor.bashrc,
example:exportHTTPSTAT_SHOW_IP=falseexportHTTPSTAT_SHOW_SPEED=trueexportHTTPSTAT_SAVE_BODY=falseBuy me a coffeeSponsorRelated ProjectsHere are some implementations in various languages:Go:davecheney/httpstatThis is the Go alternative of httpstat, it's written in pure Go and relies no external programs. Choose it if you like solid binary executions (actually I do).Go (library):tcnksm/go-httpstatOther than being a cli tool, this project is used as library to help debugging latency of HTTP requests in Go code, very thoughtful and useful, see more in thisarticleBash:b4b4r07/httpstatThis is what exactly I want to do at the very beginning, but gave up due to not confident in my bash skill, good job!Node:yosuke-furukawa/httpstatb4b4r07mentioned this in hisarticle, could be used as a HTTP client also.PHP:talhasch/php-httpstatThe PHP implementation by @talhaschSome code blocks inhttpstatare copied from other projects of mine, have a look:reorx/python-terminal-colorDrop-in single file library for printing terminal color.reorx/getenvEnvironment variable definition with type.