HTTP client for sending requests with HTTPie-compatible syntax, focused on improved performance
xh is an HTTP client that reimplements HTTPie's interface with a focus on performance improvements. It provides a command-line tool for sending HTTP requests using HTTPie's familiar syntax for headers, request bodies, query parameters, and authentication.
The tool supports HTTPie's request-item syntax, using operators like = for JSON fields, == for query parameters, : for headers, and @ for file uploads. It includes features like session management, various authentication methods (basic, bearer, digest), SSL certificate handling, and proxy support. xh can output responses in different formats with syntax highlighting and supports streaming responses.
xh offers URL shorthand notation where :8000 expands to localhost:8000 and :/path becomes localhost/path. The tool can run in HTTPie compatibility mode when invoked as http or https, and defaults to HTTPS when the binary is named xhs. It includes additional features like curl command generation, shell completions, and offline request construction for testing purposes.
Developers and system administrators who work with APIs and web services would find xh useful as a drop-in replacement for HTTPie with better performance characteristics. The tool supports extensive output customization, request debugging, and can handle complex JSON object construction using path syntax.
# via Homebrew
brew install xh
# via Cargo
cargo install xh --locked
# via Package Manager
pacman -S xh
