xh
Friendly and fast tool for sending HTTP requests. Note:
xh, written in rust, serves as an effective drop-in replacement forhttp. See also:http,curl. More information: https://github.com/ducaale/xh#usage.
- Send a GET request (shows response headers and content):
xh
- Send a POST request with a JSON body (key-value pairs are added to a top-level JSON object - e.g.
{"name": "john", "age": 25}):
xh post
- Send a GET request with query parameters (e.g. https://postman-echo.com/response-headers?foo1=bar1&foo2=bar2):
xh get
- Send a GET request with a custom header:
xh get
- Make a GET request and save the response body to a file:
xh
- Simulate sending a request without actually sending it:
xh --offline
- Show equivalent
curlcommand (this will not send any request):
xh --
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
