Friendly and fast tool for sending HTTP requests, a modern alternative to HTTPie.
xh is a friendly and fast command-line HTTP client that reimplements HTTPie's excellent design with a focus on improved performance. It provides an intuitive interface for sending HTTP requests, making it easy to interact with APIs, web services, and test endpoints from the terminal.
The tool uses HTTPie's familiar request-item syntax, allowing users to construct complex requests using simple key-value pairs. You can set headers with colons (:), add query parameters with double equals (==), include JSON data with equals (=) or colon-equals (:=), and handle file uploads with the @ symbol. This makes it particularly useful for developers, DevOps engineers, and anyone who needs to test HTTP APIs regularly.
Key advantages of xh include significantly improved startup speed compared to HTTPie, availability as a single statically linked binary for easy installation and portability, built-in HTTP/2 support, and the ability to translate requests to curl commands. It also offers features like session management, various authentication methods, response streaming, and comprehensive output formatting options. The tool maintains compatibility with HTTPie while providing better performance, making it an excellent choice for both occasional API testing and integration into automated workflows.
# via Homebrew
brew install xh
# via Cargo
cargo install xh --locked
# via cURL script
curl -sfL https://raw.githubusercontent.com/ducaale/xh/master/install.sh | sh
