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. Each app was run 5 times on a warm cache, with the following being the averages:
> /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
[x] Have Command include request body from RunConfig
[ ] Add JSON and Form arguments which automatically set headers and serialize appropriately
[ ] Allow adding arbitrary headers to request
[ ] Add documentation to major types and functions
[ ] Flag to disable ansi escaping for output
[ ] HTML pretty printing
[ ] encode body content in a specific format (JSON, YAML, etc)
[ ] decode response based on Content-Type