[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5555":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},5555,"xh","ducaale\u002Fxh","ducaale","Friendly and fast tool for sending HTTP requests","",null,"Rust",7858,130,23,34,0,10,69,3,74.25,"MIT License",false,"master",[25,26,27,28,29,30],"api-testing","cli","developer-tools","http-client","rust","terminal","2026-06-12 04:00:25","# xh\n[![Version info](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fxh.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fxh)\n[![Packaging status](https:\u002F\u002Frepology.org\u002Fbadge\u002Ftiny-repos\u002Fxh.svg)](https:\u002F\u002Frepology.org\u002Fproject\u002Fxh\u002Fversions)\n\n`xh` is a friendly and fast tool for sending HTTP requests. It reimplements as much\nas possible of [HTTPie's](https:\u002F\u002Fhttpie.io\u002F) excellent design, with a focus\non improved performance.\n\n[![asciicast](\u002Fassets\u002Fxh-demo.gif)](https:\u002F\u002Fasciinema.org\u002Fa\u002F475190)\n\n## Installation\n\n### via cURL (Linux & macOS)\n\n```\ncurl -sfL https:\u002F\u002Fraw.githubusercontent.com\u002Fducaale\u002Fxh\u002Fmaster\u002Finstall.sh | sh\n```\n\n### via Powershell (Windows)\n\n```\niwr -useb https:\u002F\u002Fraw.githubusercontent.com\u002Fducaale\u002Fxh\u002Fmaster\u002Finstall.ps1 | iex\n```\n\n\n### via a package manager\n\n| OS                            | Method     | Command                                    |\n|-------------------------------|------------|--------------------------------------------|\n| Any                           | Cargo\\*    | `cargo install xh --locked`                |\n| Any                           | [Huber]    | `huber install xh`                         |\n| Android ([Termux])            | pkg        | `pkg install xh`                           |\n| Android ([Magisk]\u002F[KernelSU]) | MMRL\\*\\*   | `mmrl install xhhttp`                      |\n| Alpine Linux                  | apk\\*\\*\\*  | `apk add xh`                               |\n| Arch Linux                    | Pacman     | `pacman -S xh`                             |\n| Debian & Ubuntu               | Apt\\*\\*\\*\\*| `sudo apt install xh`                      |\n| FreeBSD                       | FreshPorts | `pkg install xh`                           |\n| NetBSD                        | pkgsrc     | `pkgin install xh`                         |\n| Linux & macOS                 | Nixpkgs    | `nix-env -iA nixpkgs.xh`                   |\n| Linux & macOS                 | [Flox]     | `flox install xh`                          |\n| Linux & macOS                 | Homebrew   | `brew install xh`                          |\n| Linux & macOS                 | [Hermit]   | `hermit install xh`                        |\n| macOS                         | MacPorts   | `sudo port install xh`                     |\n| Windows                       | Scoop      | `scoop install xh`                         |\n| Windows                       | Chocolatey | `choco install xh`                         |\n| Windows                       | Winget     | `winget add ducaale.xh`                    |\n\n\\* Make sure that you have Rust 1.85 or later installed\n\n\\*\\* You will need to install the [MMRL CLI](https:\u002F\u002Fgithub.com\u002FDerGoogler\u002FMMRL-CLI\u002Freleases)\n\n\\*\\*\\* Built with native-tls only.\n\n\\*\\*\\*\\* Available since Debian 13 and Ubuntu 25.04. Built with native-tls only.\n\n[Huber]: https:\u002F\u002Fgithub.com\u002Finnobead\u002Fhuber#installing-huber\n[Magisk]: https:\u002F\u002Fgithub.com\u002Ftopjohnwu\u002FMagisk\n[KernelSU]: https:\u002F\u002Fkernelsu.org\n[Termux]: https:\u002F\u002Fgithub.com\u002Ftermux\u002Ftermux-app\n[Flox]: https:\u002F\u002Fflox.dev\u002Fdocs\u002F\n[Hermit]: https:\u002F\u002Fcashapp.github.io\u002Fhermit\u002F\n\n### via pre-built binaries\nThe [release page](https:\u002F\u002Fgithub.com\u002Fducaale\u002Fxh\u002Freleases) contains prebuilt binaries for Linux, macOS and Windows.\n\n## Usage\n```\nUsage: xh [OPTIONS] \u003C[METHOD] URL> [REQUEST_ITEM]...\n\nArguments:\n  \u003C[METHOD] URL>     The request URL, preceded by an optional HTTP method\n  [REQUEST_ITEM]...  Optional key-value pairs to be included in the request.\n\nOptions:\n  -j, --json                             (default) Serialize data items from the command line as a JSON object\n  -f, --form                             Serialize data items from the command line as form fields\n      --multipart                        Like --form, but force a multipart\u002Fform-data request even without files\n      --raw \u003CRAW>                        Pass raw request data without extra processing\n      --pretty \u003CSTYLE>                   Controls output processing [possible values: all, colors, format, none]\n      --format-options \u003CFORMAT_OPTIONS>  Set output formatting options\n  -s, --style \u003CTHEME>                    Output coloring style [possible values: auto, solarized, monokai, fruity]\n      --response-charset \u003CENCODING>      Override the response encoding for terminal display purposes\n      --response-mime \u003CMIME_TYPE>        Override the response mime type for coloring and formatting for the terminal\n  -p, --print \u003CFORMAT>                   String specifying what the output should contain\n  -h, --headers                          Print only the response headers. Shortcut for --print=h\n  -b, --body                             Print only the response body. Shortcut for --print=b\n  -m, --meta                             Print only the response metadata. Shortcut for --print=m\n  -v, --verbose...                       Print the whole request as well as the response\n      --debug                            Print full error stack traces and debug log messages\n      --all                              Show any intermediary requests\u002Fresponses while following redirects with --follow\n  -P, --history-print \u003CFORMAT>           The same as --print but applies only to intermediary requests\u002Fresponses\n  -q, --quiet...                         Do not print to stdout or stderr\n  -S, --stream                           Always stream the response body\n  -x, --compress...                      Content compressed (encoded) with Deflate algorithm\n  -o, --output \u003CFILE>                    Save output to FILE instead of stdout\n  -d, --download                         Download the body to a file instead of printing it\n  -c, --continue                         Resume an interrupted download. Requires --download and --output\n      --session \u003CFILE>                   Create, or reuse and update a session\n      --session-read-only \u003CFILE>         Create or read a session without updating it from the request\u002Fresponse exchange\n  -A, --auth-type \u003CAUTH_TYPE>            Specify the auth mechanism [possible values: basic, bearer, digest]\n  -a, --auth \u003CUSER[:PASS] | TOKEN>       Authenticate as USER with PASS (-A basic|digest) or with TOKEN (-A bearer)\n      --ignore-netrc                     Do not use credentials from .netrc\n      --offline                          Construct HTTP requests without sending them anywhere\n      --check-status                     (default) Exit with an error status code if the server replies with an error\n  -F, --follow                           Do follow redirects\n      --max-redirects \u003CNUM>              Number of redirects to follow. Only respected if --follow is used\n      --timeout \u003CSEC>                    Connection timeout of the request\n      --proxy \u003CPROTOCOL:URL>             Use a proxy for a protocol. For example: --proxy https:http:\u002F\u002Fproxy.host:8080\n      --verify \u003CVERIFY>                  If \"no\", skip SSL verification. If a file path, use it as a CA bundle\n      --cert \u003CFILE>                      Use a client side certificate for SSL\n      --cert-key \u003CFILE>                  A private key file to use with --cert\n      --ssl \u003CVERSION>                    Force a particular TLS version [possible values: auto, tls1, tls1.1, tls1.2, tls1.3]\n      --https                            Make HTTPS requests if not specified in the URL\n      --http-version \u003CVERSION>           HTTP version to use [possible values: 1.0, 1.1, 2, 2-prior-knowledge, 3-prior-knowledge]\n      --resolve \u003CHOST:ADDRESS>           Override DNS resolution for specific domain to a custom IP\n      --interface \u003CNAME>                 Bind to a network interface or local IP address\n  -4, --ipv4                             Resolve hostname to ipv4 addresses only\n  -6, --ipv6                             Resolve hostname to ipv6 addresses only\n      --unix-socket \u003CFILE>               Connect using a Unix domain socket\n  -I, --ignore-stdin                     Do not attempt to read stdin\n      --curl                             Print a translation to a curl command\n      --curl-long                        Use the long versions of curl's flags\n      --generate \u003CKIND>                  Generate shell completions or man pages\n      --help                             Print help\n  -V, --version                          Print version\n\nEach option can be reset with a --no-OPTION argument.\n```\n\nRun `xh help` for more detailed information.\n\n### Request Items\n\n`xh` uses [HTTPie's request-item syntax](https:\u002F\u002Fhttpie.io\u002Fdocs\u002Fcli\u002Frequest-items) to set headers, request body, query string, etc.\n\n- `=`\u002F`:=` for setting the request body's JSON or form fields (`=` for strings and `:=` for other JSON types).\n- `==` for adding query strings.\n- `@` for including files in multipart requests e.g `picture@hello.jpg` or `picture@hello.jpg;type=image\u002Fjpeg;filename=goodbye.jpg`.\n- `:` for adding or removing headers e.g `connection:keep-alive` or `connection:`.\n- `;` for including headers with empty values e.g `header-without-value;`.\n\nAn `@` prefix can be used to read a value from a file. For example: `x-api-key:@api-key.txt`.\n\nThe request body can also be read from standard input, or from a file using `@filename`.\n\nTo construct a complex JSON object, a JSON path can be used as a key e.g `app[container][0][id]=090-5`.\nFor more information on this syntax, refer to https:\u002F\u002Fhttpie.io\u002Fdocs\u002Fcli\u002Fnested-json.\n\n### Shorthand form for URLs\n\nSimilar to HTTPie, specifying the scheme portion of the request URL is optional, and a leading colon works as shorthand\nfor localhost. `:8000` is equivalent to `localhost:8000`, and `:\u002Fpath` is equivalent to `localhost\u002Fpath`.\n\nURLs can have a leading `:\u002F\u002F` which allows quickly converting a URL into a valid xh or HTTPie command. For example\n`http:\u002F\u002Fhttpbin.org\u002Fjson` becomes `http :\u002F\u002Fhttpbin.org\u002Fjson`.\n\n\n```sh\nxh http:\u002F\u002Flocalhost:3000\u002Fusers # resolves to http:\u002F\u002Flocalhost:3000\u002Fusers\nxh localhost:3000\u002Fusers        # resolves to http:\u002F\u002Flocalhost:3000\u002Fusers\nxh :3000\u002Fusers                 # resolves to http:\u002F\u002Flocalhost:3000\u002Fusers\nxh :\u002Fusers                     # resolves to http:\u002F\u002Flocalhost:80\u002Fusers\nxh example.com                 # resolves to http:\u002F\u002Fexample.com\nxh :\u002F\u002Fexample.com              # resolves to http:\u002F\u002Fexample.com\n```\n\n### Making HTTPS requests by default\n\n`xh` will default to HTTPS scheme if the binary name is one of `xhs`, `https`, or `xhttps`. If you have installed `xh`\nvia a package manager, both `xh` and `xhs` should be available by default. Otherwise, you need to create one like this:\n\n```sh\ncd \u002Fpath\u002Fto\u002Fxh && ln -s .\u002Fxh .\u002Fxhs\nxh httpbin.org\u002Fget  # resolves to http:\u002F\u002Fhttpbin.org\u002Fget\nxhs httpbin.org\u002Fget # resolves to https:\u002F\u002Fhttpbin.org\u002Fget\n```\n\n### Strict compatibility mode\n\nIf `xh` is invoked as `http` or `https` (by renaming the binary), or if the `XH_HTTPIE_COMPAT_MODE` environment variable is set,\nit will run in HTTPie compatibility mode. The only current difference is that `--check-status` is not enabled by default.\n\n## Examples\n\n```sh\n# Send a GET request\nxh httpbin.org\u002Fjson\n\n# Send a POST request with body {\"name\": \"ahmed\", \"age\": 24}\nxh httpbin.org\u002Fpost name=ahmed age:=24\n\n# Send a GET request with querystring id=5&sort=true\nxh get httpbin.org\u002Fjson id==5 sort==true\n\n# Send a GET request and include a header named x-api-key with value 12345\nxh get httpbin.org\u002Fjson x-api-key:12345\n\n# Send a POST request with body read from stdin.\necho \"[1, 2, 3]\" | xh post httpbin.org\u002Fpost\n\n# Send a PUT request and pipe the result to less\nxh put httpbin.org\u002Fput id:=49 age:=25 | less\n\n# Download and save to res.json\nxh -d httpbin.org\u002Fjson -o res.json\n\n# Make a request with a custom user agent\nxh httpbin.org\u002Fget user-agent:foobar\n```\n\n## How xh compares to HTTPie\n\n### Advantages\n\n- Improved startup speed.\n- Available as a single statically linked binary that's easy to install and carry around.\n- HTTP\u002F2 support.\n- Builtin translation to curl commands with the `--curl` flag.\n- Short, cheatsheet-style output from `--help`. (For longer output, pass `help`.)\n\n### Disadvantages\n\n- Not all of HTTPie's features are implemented. ([#4](https:\u002F\u002Fgithub.com\u002Fducaale\u002Fxh\u002Fissues\u002F4))\n- No plugin system.\n- General immaturity. HTTPie is old and well-tested.\n- Worse documentation.\n\n## Similar or related Projects\n\n- [curlie](https:\u002F\u002Fgithub.com\u002Frs\u002Fcurlie) - frontend to cURL that adds the ease of use of httpie\n- [httpie-go](https:\u002F\u002Fgithub.com\u002Fnojima\u002Fhttpie-go) - httpie-like HTTP client written in Go\n- [curl2httpie](https:\u002F\u002Fgithub.com\u002Fdcb9\u002Fcurl2httpie) - convert command arguments between cURL and HTTPie\n","xh 是一个友好且快速的 HTTP 请求发送工具。它尽可能地重新实现了 HTTPie 的优秀设计，并专注于性能提升，使用 Rust 语言编写，确保了高效的执行速度和良好的用户体验。该工具支持丰富的命令行选项，能够方便地构建和发送复杂的 HTTP 请求，适用于API测试、开发调试以及任何需要从终端发送HTTP请求的场景。其简洁直观的输出格式也使得结果易于阅读和理解。",2,"2026-06-11 03:03:56","top_language"]