xh: Fast Rust HTTPie-Compatible HTTP Client
xh is a single-binary reimplementation of HTTPie in Rust, using the same request grammar with faster startup.
xh mirrors HTTPie's syntax (field=value, :=, ==, Header:value) but ships as one static binary with no Python runtime, which makes it quick to install on a minimal CI image.
What it does
xh sends HTTP requests with HTTPie-compatible syntax: xh GET url and xh POST url field=value behave like their http counterparts, including := for raw JSON and == for query params. It defaults to GET, colorizes JSON, and installs as a standalone binary with no interpreter.
Common usage
xh GET example.com/api/users
xh :8080/health # method defaults to GET
xh POST example.com/api name=Ada active:=true
xh --follow GET example.com/Options
| Item / flag | What it does |
|---|---|
| field=value | String JSON body field |
| field:=value | Raw JSON body field |
| name==value | URL query parameter |
| --follow | Follow redirects |
| --check-status | Set the exit code from the HTTP status |
| --timeout <sec> | Request timeout |
In CI
xh is convenient when you want HTTPie ergonomics without installing Python. There is also an xhs entry point that defaults to https, mirroring HTTPie's https. Like HTTPie, it does not follow redirects unless you pass --follow.
Common errors in CI
xh: error: error sending request for url (...): error trying to connect: tcp connect error: Connection refused (os error 111) means the target port has nothing listening yet. error trying to connect: dns error means the host did not resolve. A timeout surfaces as operation timed out; raise --timeout.