Skip to content

carapace-sh/carapace-bin / skills/httpie

Use when working with HTTPie (http/https CLI) — the command-line HTTP client for the API era. Covers request items syntax (headers, params, data fields, file uploads), authentication (basic, digest, bearer, plugins), session management, output formatting and printing, SSL/TLS configuration, download mode, configuration files, environment variables, plugin system, exit codes, scripting, and URL syntax. Triggers on: "httpie", "http command", "https command", "http --json", "http --form", "http --download", "http --session", "http --auth", "http --auth-type", "http --print", "http --verbose", "http --follow", "http --offline", "http --check-status", "http --proxy", "http --ssl", "http --cert", "http --verify", "http --format-options", "http --pretty", "http --style", "http --stream", "http --boundary", "http --multipart", "http --raw", "httpie config", "HTTPIE_CONFIG_DIR", "httpie cli plugins", "request items", "data fields", "URL parameters", "HTTP headers", "raw JSON fields", "file upload fields", "named session", "anonymous session", "read-only session", "Content-Disposition", "httpie-unixsocket", "httpie plugins", "AuthPlugin", "TransportPlugin", "ConverterPlugin", "FormatterPlugin".

FileKindSize
SKILL.mdskill md8.2 KB
references/auth.mdmarkdown3.3 KB
references/cli.mdmarkdown6.6 KB
references/config.mdmarkdown4.0 KB
references/downloads.mdmarkdown3.7 KB
references/output.mdmarkdown6.1 KB
references/plugins.mdmarkdown5.6 KB
references/request-items.mdmarkdown4.9 KB
references/scripting.mdmarkdown3.7 KB
references/sessions.mdmarkdown5.0 KB
references/ssl.mdmarkdown2.8 KB
references/url-syntax.mdmarkdown3.5 KB

references/auth.md

View on GitHub
# Authentication

HTTPie's authentication mechanisms — built-in types, .netrc, password prompting, and plugin-based auth.

## Built-in Auth Types

| Mechanism | `--auth-type` (`-A`) | `--auth` (`-a`) value | Description |
|-----------|---------------------|----------------------|-------------|
| Basic | `basic` (default) | `USER:PASS` | HTTP Basic authentication |
| Digest | `digest` | `USER:PASS` | HTTP Digest authentication |
| Bearer | `bearer` | `TOKEN` | Bearer token authentication |

### Basic Auth

```bash
$ http -a username:password pie.dev/basic-auth/username/password
```

If only the username is provided, HTTPie securely prompts for the password:

```bash
$ http -a username pie.dev/basic-auth/username/password
# HTTPie prompts: password:
```

An empty password can be sent without prompting:

```bash
$ http -a username: pie.dev/basic-auth/username/password
```

Basic auth also works via URL syntax:

```bash
$ http username:password@pie.dev/basic-auth/username/password
```

### Digest Auth

```bash
$ http -A digest -a username:password pie.dev/digest-auth/username/password
```

### Bearer Auth

```bash
$ https -A bearer -a my-token api.example.com/me
```

## .netrc Support

HTTPie automatically reads credentials from `~/.netrc` (or `~/._netrc` on Windows) unless `--ignore-netrc` is set.

A `.netrc` entry:

```
machine pie.dev
  login username
  password secret
```

```bash
# Credentials from .netrc are used automatically
$ http pie.dev/basic-auth/username/secret

# Disable .netrc lookup
$ http --ignore-netrc pie.dev/basic-auth/username/secret
```

## Password Prompting

When `--auth` is provided with a username but no password (`-a username`), HTTPie prompts for the password interactively. This prevents passwords from appearing in shell history or process lists.

Prompted passwords are persisted in session files if `--session` is used. See [sessions.md](sessions.md).

## Auth Plugins

Additional authentication mechanisms are available as plugins. See [plugins.md](plugins.md) for installation and development.

| Plugin | Auth Type | Description |
|--------|----------|-------------|
| httpie-ntlm | ntlm | NT LAN Manager authentication |
| httpie-jwt-auth | jwt | JSON Web Token authentication |
| httpie-oauth1 | oauth1 | OAuth 1.0a |
| httpie-aws-auth | aws | AWS / Amazon S3 authentication |
| httpie-edgegrid | edgegrid | Akamai EdgeGrid authentication |
| httpie-hmac-auth | hmac | HMAC authentication |
| httpie-api-auth | api-auth | API authentication |
| httpie-negotiate | negotiate | SPNEGO (GSS Negotiate) |
| requests-hawk | hawk | Hawk authentication |

Usage with a plugin:

```bash
$ http --auth-type=ntlm --auth=domain\\user:pass example.org
```

## Carapace Completion

The carapace completer provides flag completion for `--auth-type`:

```go
"auth-type": carapace.ActionValues("basic", "digest"),
```

Note: `bearer` is missing from the completer's `--auth-type` values in the current implementation (`completers/common/http_completer/cmd/root.go:75`).

## References

- Source of truth: <https://httpie.io/docs/cli> (Authentication section)
- Auth plugins list: <https://httpie.io/docs/cli/auth-plugins>
- Carapace completer: `completers/common/http_completer/cmd/root.go`

## Related Skills

- [sessions.md](sessions.md) — how auth credentials persist in sessions
- [plugins.md](plugins.md) — plugin installation and development
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall