xh sends HTTP requests from the terminal with HTTPie-style request items, emphasizing startup speed and HTTP/2 support. Prebuilt binaries cover Linux, macOS, and Windows.
Overview
xh reimplements much of HTTPie’s request syntax for headers, JSON and form bodies, query strings, and file uploads. Shorthand URL forms accept omitted schemes or leading colons for localhost shortcuts.
Installing the binary as xhs, https, or xhttps defaults requests to HTTPS. An HTTPie compatibility mode aligns behavior when the binary is named http or https or when an environment variable is set.
Compared to HTTPie, the project cites faster startup, static binaries, HTTP/2, and a --curl flag to translate commands. Some HTTPie features, plugins, and documentation depth are noted as not yet matched.
Package managers and cargo install paths are listed for many Linux distributions, macOS, Windows, Android Termux, and other channels.
Key features
- HTTPie-like request item syntax
- HTTP/2 support
- Fast CLI startup
- Single static binaries
- HTTPS default via binary aliases
- HTTPie compatibility mode
- Curl command translation flag
- JSON and multipart file uploads
Use cases
- Quick REST API debugging
- Scripted HTTP calls in shell
- Local development against services
- Testing endpoints with JSON bodies
- Downloading API responses to files