All Projects → reorx → Httpstat

reorx / Httpstat

Licence: mit
curl statistics made simple

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to Httpstat

Cognitocurl
🦉🤖Easily sign curl calls to API Gateway with Cognito authorization token.
Stars: ✭ 76 (-98.48%)
Mutual labels:  cli, curl
Twurl
OAuth-enabled curl for the Twitter API
Stars: ✭ 1,648 (-66.98%)
Mutual labels:  cli, curl
Getnews.tech
A web server that fetches data from the News API and formats it for display in the terminal.
Stars: ✭ 94 (-98.12%)
Mutual labels:  cli, curl
Coronavirus Tracker Cli
Track conronavirus cases from command line. curl https://corona-stats.online/
Stars: ✭ 954 (-80.89%)
Mutual labels:  cli, curl
Graphqurl
curl for GraphQL with autocomplete, subscriptions and GraphiQL. Also a dead-simple universal javascript GraphQL client.
Stars: ✭ 3,012 (-39.65%)
Mutual labels:  cli, curl
Bashupload
PHP/JavaScript file upload web app to upload files from command line & browser, and download them elsewhere. Frequently used to upload/download files on servers. Hosted version is available at bashupload.com.
Stars: ✭ 56 (-98.88%)
Mutual labels:  cli, curl
Wuzz
Interactive cli tool for HTTP inspection
Stars: ✭ 9,845 (+97.26%)
Mutual labels:  cli, curl
Gql
Very simple CLI for many GraphQL schemas in the cloud. Provides autocompletion for GraphQL queries
Stars: ✭ 101 (-97.98%)
Mutual labels:  cli, curl
Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+962.95%)
Mutual labels:  cli, curl
Websocat
Command-line client for WebSockets, like netcat (or curl) for ws:// with advanced socat-like functions
Stars: ✭ 3,477 (-30.33%)
Mutual labels:  cli, curl
Curlie
The power of curl, the ease of use of httpie.
Stars: ✭ 877 (-82.43%)
Mutual labels:  cli, curl
Xidel
Command line tool to download and extract data from HTML/XML pages or JSON-APIs, using CSS, XPath 3.0, XQuery 3.0, JSONiq or pattern matching. It can also create new or transformed XML/HTML/JSON documents.
Stars: ✭ 335 (-93.29%)
Mutual labels:  cli, curl
Cheat.sh
the only cheat sheet you need
Stars: ✭ 27,798 (+456.96%)
Mutual labels:  cli, curl
Wsend
wsend: The opposite of wget
Stars: ✭ 64 (-98.72%)
Mutual labels:  cli, curl
Rate.sx
💰 curl cryptocurrencies exchange rates
Stars: ✭ 563 (-88.72%)
Mutual labels:  cli, curl
Covid19 Tracker Cli
A curl-based command line tracker for Novel Coronavirus or COVID-19 pandemic. It Supports terminal for linux and macos, command prompt for windows, and termux for android with real-time updates.
Stars: ✭ 244 (-95.11%)
Mutual labels:  cli, curl
Data Science At The Command Line
Data Science at the Command Line
Stars: ✭ 3,174 (-36.41%)
Mutual labels:  cli, curl
Stonks
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal. See how fast your stonks will crash.
Stars: ✭ 405 (-91.89%)
Mutual labels:  cli, curl
Cbt
CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala
Stars: ✭ 489 (-90.2%)
Mutual labels:  cli
Instapy Cli
✨ Python library and CLI to upload photo and video on Instagram. W/o a phone!
Stars: ✭ 498 (-90.02%)
Mutual labels:  cli

httpstat

screenshot

httpstat visualizes curl(1) statistics in a way of beauty and clarity.

It is a single file🌟 Python script that has no dependency👏 and is compatible with Python 3🍻.

Installation

There are three ways to get httpstat:

  • Download the script directly: wget https://raw.githubusercontent.com/reorx/httpstat/master/httpstat.py

  • Through pip: pip install httpstat

  • Through homebrew (macOS only): brew install httpstat

For Windows users, @davecheney's Go version is suggested. → download link

Usage

Simply:

python httpstat.py httpbin.org/get

If installed through pip or brew, you can use httpstat as a command:

httpstat httpbin.org/get

cURL Options

Because httpstat is a wrapper of cURL, you can pass any cURL supported option after the url (except for -w, -D, -o, -s, -S which are already used by httpstat):

httpstat httpbin.org/post -X POST --data-urlencode "a=b" -v

Environment Variables

httpstat has a bunch of environment variables to control its behavior. Here are some usage demos, you can also run httpstat --help to see full explanation.

  • HTTPSTAT_SHOW_BODY

    Set to true to show response body in the output, note that body length is limited to 1023 bytes, will be truncated if exceeds. Default is false.

  • HTTPSTAT_SHOW_IP

    By default httpstat shows remote and local IP/port address. Set to false to disable this feature. Default is true.

  • HTTPSTAT_SHOW_SPEED

    Set to true to show download and upload speed. Default is false.

    HTTPSTAT_SHOW_SPEED=true httpstat http://cachefly.cachefly.net/10mb.test
    
    ...
    speed_download: 3193.3 KiB/s, speed_upload: 0.0 KiB/s
  • HTTPSTAT_SAVE_BODY

    By default httpstat stores body in a tmp file, set to false to disable this feature. Default is true

  • HTTPSTAT_CURL_BIN

    Indicate the cURL bin path to use. Default is curl from current shell $PATH.

    This exampe uses brew installed cURL to make HTTP2 request:

    HTTPSTAT_CURL_BIN=/usr/local/Cellar/curl/7.50.3/bin/curl httpstat https://http2.akamai.com/ --http2
    
    HTTP/2 200
    ...

    cURL must be compiled with nghttp2 to enable http2 feature (#12).

  • HTTPSTAT_METRICS_ONLY

    If set to true, httpstat will only output metrics in json format, this is useful if you want to parse the data instead of reading it.

  • HTTPSTAT_DEBUG

    Set to true to see debugging logs. Default is false

For convenience, you can export these environments in your .zshrc or .bashrc, example:

export HTTPSTAT_SHOW_IP=false
export HTTPSTAT_SHOW_SPEED=true
export HTTPSTAT_SAVE_BODY=false

Related Projects

Here are some implementations in various languages:

  • Go: davecheney/httpstat

    This 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-httpstat

    Other 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 this article

  • Bash: b4b4r07/httpstat

    This 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/httpstat

    b4b4r07 mentioned this in his article, could be used as a HTTP client also.

  • PHP: talhasch/php-httpstat

    The PHP implementation by @talhasch

Some code blocks in httpstat are copied from other projects of mine, have a look:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].