> For the complete documentation index, see [llms.txt](https://cajac.gitbook.io/ctf-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cajac.gitbook.io/ctf-notes/web/common-web-tools/httpie.md).

# HTTPie

**HTTPie** is a command-line HTTP client. Its goal is to make CLI interaction with web services as human-friendly as possible. HTTPie is designed for testing, debugging, and generally interacting with APIs & HTTP servers. The `http` & `https` commands allow for creating and sending arbitrary HTTP requests. They use simple and natural syntax and provide formatted and colorized output.

## Simple Examples

### Simple GET request

To do a simple GET request

```bash
http http://10.129.37.145/?file=/etc/passwd
```

## Output option

### Print body only

To output only the body, use `-b`, `--body`,  or `--print=b`

```bash
http -b http://10.129.37.145/?file=/etc/passwd
```

### Print headers only

To output only the headers, use `-h`, `--headers`, or `--print=h`&#x20;

```bash
http -h http://10.129.37.145/?file=/etc/passwd
```

### Print verbose output

To print verbose output which include both the request and the response, use `-v` or `--verbose`&#x20;

```bash
http -v http://10.129.37.145/?file=/etc/passwd
```

## Resources

HTTPIE CLI - Documentation: <https://httpie.io/docs/cli>

HTTPIE CLI - GitHub: <https://github.com/httpie/cli>

HTTPIE - Homepage: <https://httpie.io/>
