xh: A Fast HTTPie-Compatible HTTP Client
xh is a single-binary HTTP client that copies HTTPie syntax (name=value fields, Header:value, name==query) but starts faster and needs no Python runtime.
xh is the choice when you want HTTPie ergonomics without a Python dependency on the runner. Most HTTPie commands work unchanged.
What it does
xh sends HTTP requests using HTTPie-compatible item syntax: name=value JSON string fields, name:=value raw JSON, Header:value headers, name==value query parameters. It defaults to JSON, infers the method from whether a body is present, and pretty-prints responses. Being a single static Rust binary, it has no interpreter startup cost.
Common usage
xh GET httpbin.org/get search==term
xh POST api.example.com/users name=Ada active:=true
xh GET api.example.com/me Authorization:"Bearer $TOKEN"
xh --check-status GET https://example.com/health
xh -d GET https://example.com/file.tar.gz # downloadOptions
| Syntax / flag | What it does |
|---|---|
| name=value / name:=value | JSON string field / raw JSON field |
| Header:value | Request header |
| name==value | URL query parameter |
| --check-status | Exit non-zero on a 4xx/5xx response |
| -b / --body | Print only the response body |
| -d / --download | Save the response body to a file |
| --ignore-stdin | Do not read a body from stdin |
| xhs | Alias that defaults to HTTPS |
In CI
xh installs as one binary (cargo install xh, brew install xh, or a GitHub release), so there is nothing to compile or pip-install on the runner, which keeps cold-start jobs fast. As with HTTPie, add --check-status to fail on error responses. The xhs alias forces HTTPS for host-only URLs.
Common errors in CI
"xh: command not found" means it is not installed; grab the release binary and add it to PATH. A few advanced HTTPie plugins and flags are not implemented, so a copied command may report "unexpected argument"; check xh --help. --check-status exit codes mirror HTTPie: 3/4/5 for 3xx/4xx/5xx and 2 for a connection error.