# Xh (replacement for postman, curl, httpie, etc.)

**URL:** <https://forum.codeselfstudy.com/t/xh-replacement-for-postman-curl-httpie-etc/2804>\
**Category:** Operating Systems, Editors, and Tools\
**Created:** [March 13, 2022, 12:25am UTC](https://forum.codeselfstudy.com/t/xh-replacement-for-postman-curl-httpie-etc/2804 "2022-03-13T00:25:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [March 13, 2022, 12:25am UTC](https://forum.codeselfstudy.com/t/xh-replacement-for-postman-curl-httpie-etc/2804/1 "2022-03-13T00:25:55Z")

</div>

[xh](https://github.com/ducaale/xh) is worth checking out. It’s a rewrite of [HTTPie](https://forum.codeselfstudy.com/t/httpie-and-http-prompt/2379) in Rust, with a few extra features.

You can use it to learn `curl` by using the `--curl` flag like this:

```auto
xh post localhost:8000/articles/ title='my blog post' author='josh' --curl

```

It then prints out the `curl` version:

```auto
curl -X POST http://localhost:8000/articles/ -H 'content-type: application/json' -H 'accept: application/json, */*;q=0.5' -d '{"title":"my blog post","author":"josh"}'

```

The `--offline` flag shows what the request would look like (without sending it). This command:

```auto
xh post localhost:8000/articles/ title='my blog post' author='josh' --offline

```

prints out this data:

```auto
POST /articles/ HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 40
Content-Type: application/json
Host: localhost:8000
User-Agent: xh/0.15.0

{
    "title": "my blog post",
    "author": "josh"
}

```

Without those flags, it makes the actual request:

```bash
xh post localhost:8000/articles/ title='my blog post' author='josh'

```

which prints out the live response:

```auto
HTTP/1.1 201 Created
Content-Length: 52
Content-Type: application/json
Cross-Origin-Opener-Policy: same-origin
Date: Thu, 10 Mar 2022 03:34:50 GMT
Referrer-Policy: same-origin
Server: WSGIServer/0.2 CPython/3.10.2
X-Content-Type-Options: nosniff
X-Frame-Options: DENY

{
    "id": 9,
    "title": "my blog post",
    "author": "josh"
}

```

Here’s the Github page:

> **[GitHub - ducaale/xh: Friendly and fast tool for sending HTTP requests](https://github.com/ducaale/xh)**
>
> Friendly and fast tool for sending HTTP requests
