# uget

A minimal cli tool to make http requests.

## Install

```sh
cargo install uget
```

## Features

* Make http requests
* Download files
* Upload files
* Save response body to a file
* Print request or response
* Set headers, body, method, form fields, multipart form fields
* Easily set bearer and basic auth
* Client certificate and private key for mutual auth
* Use custom CA certificate for verify
* Use stdin as body, or save response body to a file using stdout
* Show progress bar for download
* Resume download from a previous one
* Allow enter password for auth from stdin

You want, you get!

![uget](https://raw.githubusercontent.com/ararog/uget/refs/heads/main/uget.gif)


## Usage

```sh
uget <url> <body> [OPTIONS]
```

## Examples

### GET (will print to stdout and hide progress bar)
```sh
uget https://example.com
```

### JSON (defaults to POST method)
```sh
echo "{title: 'foo', body: 'bar', userId: 1}" | uget https://example.com
```

### Form (defaults to POST method)
```sh
uget https://example.com --field "title=foo" --field "body=bar" --field "userId=1"
```

### Header
```sh
uget https://example.com -m POST --header "Content-Type: application/json" "{ title: 'foo', body: 'bar', userId: 1 }"
```

### Bearer
```sh
uget https://example.com/users/1 -m DELETE --bearer <token>
```

### Basic
```sh
uget https://example.com -m POST --basic <username>:<password>
```

## Blog Posts

- [A Deep Dive into `ararog/uget`: The Modern Command-Line HTTP Client](https://dev.to/rogrio_arajo_55dae16f0d/a-deep-dive-into-araroguget-the-modern-command-line-http-client-3ea7)
