rust-client
A fast, opinionated command line HTTP client.
Fundamentally, rust-client
is a thin wrapper around Rust's fantastic reqwest
library. Unlike curl
, however, it is designed more as a debugging tool. Headers are displayed above the response body, the command line interface is more intuitive than remembering flags, and default en-/decoding behavior.
Performance
The following is a totally unscientific benchmark using /usr/bin/time
to finely measure memory usage and timing for rust-client
, curl
, and Python http
; on my very old development box:
> /usr/bin/time
> /usr/bin/time
> /usr/bin/time
Note, the measurement of http
is after warming up the Python runtime using multiple runs of http
. The following is the initial result:
While rust-client
and curl
perform similarly, curl
does not print the same level of information that rust-client
does.
The test server is the example server from hyper
's documentation.
TODO
- Colorize output
- HTML pretty printing
- encode body content in a specific format (JSON, YAML, etc)
- decode response based on Content-Type