XH(1) XH(1) (NAME) xh - HTTP (SYNOPSIS) xh [OPTIONS] [METHOD] URL [--] [REQUEST_ITEM ...] (DESCRIPTION) xh HTTP . . xh HTTPie : http(1) . --curl curl(1) . (POSITIONAL ARGUMENTS) [METHOD] HTTP . GET POST . URL (URL) . (URL scheme) "http://" "xhs" "https://" . localhost . ":8000" "localhost:8000" ":/path" "localhost/path". [REQUEST_ITEM ...] - . : key==value (query string) URL. key=value JSON (--json) (--form) . key:=value JSON . : "numbers:=[1,2,3] enabled:=true" key@filename ( --form --multipart). (mimetype) ";type=" ";filename=" . : "pfp@ra.jpg;type=image/jpeg;filename=profile.jpg" @filename . header:value "user-agent:foobar" header: "connection:" header; . "@" . : "x-api-key:@api-key.txt". (escape) "weird\:key=value". JSON REQUEST_ITEM JSON ( JSON path) . https://httpie.io/docs/cli/nested-json . (OPTIONS) --OPTION --no-OPTION . -j, --json () JSON. --form --multipart . -f, --form . --json --multipart . --multipart --form multipart/form-data . --json --form . --raw=RAW . --pretty=STYLE . : all () colors (syntax highlighting) format JSON none NO_COLOR "format" (stdout) tty "none" . --format-options=FORMAT_OPTIONS . : json.indent: json.format: xml.indent: xml.format: headers.sort: : --format-options=json.indent:2,headers.sort:false. -s, --style=THEME . [ : auto, solarized, monokai, fruity] --response-charset=ENCODING (encoding) . : --response-charset=latin1. --response-mime=MIME_TYPE MIME . : --response-mime=application/json. -p, --print=FORMAT H B h b m () : --print=Hb..TP 4 -h, --headers . --print=h. -b, --body . --print=b. -m, --meta . --print=m. -v, --verbose . --all / . -vv . --print=HhBb --all. --debug (stack traces) . (logging) `$RUST_LOG` . `RUST_LOG=trace` . https://docs.rs/env_logger/0.11.3/env_logger/#enabling-logging . --all / --follow. -P, --history-print=FORMAT --print / . -q, --quiet stdout stderr . -qq . -S, --stream (stream) . -x, --compress Deflate () . Content-Encoding deflate . . . : Content-Encoding . -o, --output=FILE FILE stdout. -d, --download . Accept-Encoding identity . -c, --continue . --download --output . --session=FILE (session). . --session-read-only=FILE /. -A, --auth-type=AUTH_TYPE . [ : basic, bearer, digest] -a, --auth=USER[:PASS] | TOKEN USER PASS (-A basic|digest) TOKEN (-A bearer). PASS . ( "USER:") . --auth-type=bearer TOKEN . --ignore-netrc .netrc . --offline HTTP . --check-status () . 4xx ( ) 5xx ( ) 3xx ( ) --follow . stdout stderr . -F, --follow . --max-redirects=NUM . --follow . --timeout=SEC (timeout) . "0" . --proxy=PROTOCOL:URL (proxy) . : --proxy https:http://proxy.host:8080. PROTOCOL "all" "http" "https" . URL : --proxy http:socks5://user:password@proxy.host:8000. . "ALL_PROXY" "HTTP_PROXY" "HTTPS_PROXY" --proxy . --verify=VERIFY "no" SSL . CA . CA . "false" "no" . "yes" ("true") . --cert=FILE SSL. --cert-key=FILE --cert. . --ssl=VERSION TLS. "auto" . [ : auto, tls1, tls1.1, tls1.2, tls1.3] --native-tls TLS rustls ( ). --https HTTPS URL . --http-version=VERSION HTTP . [ : 1.0, 1.1, 2, 2-prior-knowledge, 3-prior-knowledge] --resolve=HOST:ADDRESS DNS IP . . : --resolve=example.com:127.0.0.1. --interface=NAME (bind) IP . : --interface=eth0 --interface=192.168.0.2. -4, --ipv4 ipv4. -6, --ipv6 ipv6. --unix-socket=FILE (Unix domain socket). : xh :/index.html --unix-socket=/var/run/temp.sock..TP 4 -I, --ignore-stdin (stdin) . stdin (redirected) . xh . . --curl curl. . --curl-long curl. --generate=KIND (shell completions) . : complete-bash bash complete-elvish elvish complete-fish fish complete-nushell nushell complete-powershell powershell complete-zsh zsh man roff man-markdown markdown : xh --generate=complete-bash > xh.bash. --help . -V, --version . (EXIT STATUS) 0 . 1 (syntax) . 2 (timeout). 3 HTTP 3xx. 4 HTTP 4xx. 5 HTTP 5xx. 6 (too many redirects). (ENVIRONMENT) XH_CONFIG_DIR config.json . Linux/macOS ~/.config/xh Windows %APPDATA%\xh . XH_HTTPIE_COMPAT_MODE HTTPie . --check-status . http https . REQUESTS_CA_BUNDLE, CURL_CA_BUNDLE CA (CA bundle) . ALL_PROXY=[protocol://][:port] ( ). HTTP_PROXY=[protocol://][:port] HTTP . HTTPS_PROXY=[protocol://][:port] HTTPS . NO_PROXY . "*" . NETRC .netrc. NO_COLOR . RUST_LOG . (FILES) ~/.config/xh/config.json xh. "default_options" xh . : { "default_options": ["--native-tls", "--style=solarized"] } ~/.netrc, ~/_netrc (auto-login). ~/.config/xh/sessions (session) ..SH " (EXAMPLES)" xh httpbin.org/json GET. xh httpbin.org/post name=ahmed age:=24 POST {"name": "ahmed", "age": 24}. xh get httpbin.org/json id==5 sort==true GET http://httpbin.org/json?id=5&sort=true. xh get httpbin.org/json x-api-key:12345 GET X-Api-Key 12345. echo "[1, 2, 3]" | xh post httpbin.org/post POST stdin . xh put httpbin.org/put id:=49 age:=25 | less PUT (pipe) less. xh -d httpbin.org/json -o res.json res.json. xh httpbin.org/get user-agent:foobar (User-Agent) . xhs example.com HTTPS https://example.com. (BUGS) xh (SEE ALSO) curl(1), http(1) HTTPie 0.26.2 2026-07-26 XH(1)