carapace-sh/carapace-bin / skills/httpie
httpie
UnverifiedUse 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".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.2 KB |
| references/auth.md | markdown | 3.3 KB |
| references/cli.md | markdown | 6.6 KB |
| references/config.md | markdown | 4.0 KB |
| references/downloads.md | markdown | 3.7 KB |
| references/output.md | markdown | 6.1 KB |
| references/plugins.md | markdown | 5.6 KB |
| references/request-items.md | markdown | 4.9 KB |
| references/scripting.md | markdown | 3.7 KB |
| references/sessions.md | markdown | 5.0 KB |
| references/ssl.md | markdown | 2.8 KB |
| references/url-syntax.md | markdown | 3.5 KB |
references/config.md
View on GitHub# Configuration
HTTPie's configuration system — config file location, `config.json` format, `default_options`, `plugins_dir`, environment variables, and config directory resolution.
## Config File Location
### Default Paths
| Platform | Default Path |
|----------|-------------|
| Linux/macOS | `$XDG_CONFIG_HOME/httpie/config.json` (defaults to `~/.config/httpie/config.json`) |
| Windows | `%APPDATA%\httpie\config.json` |
| Legacy | `~/.httpie/config.json` (if `~/.httpie` directory exists) |
The config file does not exist by default — you must create it manually.
### Resolution Order (Unix-like)
1. If `$HTTPIE_CONFIG_DIR` is set, use that directory
2. If `~/.httpie` exists (legacy), use `~/.httpie/config.json`
3. Otherwise, use `$XDG_CONFIG_HOME/httpie/config.json` (defaults to `~/.config/httpie/config.json`)
### Finding the Config Directory
```bash
$ http --debug 2>&1 | grep config_dir
config_dir: '/home/user/.config/httpie'
```
## Config File Format
The config file is a JSON object with two keys:
### `default_options`
An array of CLI options applied to every invocation:
```json
{
"default_options": [
"--style=fruity"
]
}
```
Any HTTPie option can be included. Un-set a default for a single invocation with `--no-OPTION`:
```bash
# If config has "--style=fruity", override for one request:
$ http --no-style example.org
```
### `plugins_dir`
The directory where plugins are installed. HTTPie needs read/write access:
```json
{
"plugins_dir": "/home/user/.local/share/httpie/plugins"
}
```
By default, plugins are stored under the config directory.
## Environment Variables
| Variable | Purpose | Default |
|----------|---------|---------|
| `HTTPIE_CONFIG_DIR` | Override the config directory location | Platform-specific (see above) |
| `XDG_CONFIG_HOME` | Base directory for XDG config home | `~/.config` |
| `HTTP_PROXY` | Proxy for HTTP requests | No proxy |
| `HTTPS_PROXY` | Proxy for HTTPS requests | No proxy |
| `NO_PROXY` | Comma-separated hosts to exclude from proxying | All requests use proxy |
| `ALL_PROXY` | Fallback proxy for all protocols | No fallback |
| `REQUESTS_CA_BUNDLE` | Path to CA bundle for certificate verification | System default |
### Example: Custom Config Directory
```bash
$ export HTTPIE_CONFIG_DIR=/tmp/httpie
$ http pie.dev/get
```
## Session Storage
Named sessions are stored in the `sessions` subdirectory of the config directory:
- `~/.config/httpie/sessions/<host>/<name>.json`
See [sessions.md](sessions.md) for session details.
## Proxies
### Environment Variable Proxies
```bash
$ export HTTP_PROXY=http://10.10.1.10:3128
$ export HTTPS_PROXY=https://10.10.1.10:1080
$ export NO_PROXY=localhost,127.0.0.1
$ http example.org
```
### `--proxy` Flag
The `--proxy` flag takes precedence over environment variables and can be specified multiple times:
```bash
$ http --proxy=http:http://user:pass@host:3128 \
--proxy=https:https://user:pass@host:1080 \
example.org
```
SOCKS proxy support:
```bash
$ http --proxy=http:socks5://user:pass@host:port \
--proxy=https:socks5://user:pass@host:port \
example.org
```
## Redirects
| Setting | Behavior |
|---------|---------|
| Default | Redirects are NOT followed (only first response shown) |
| `--follow` (`-F`) | Follow 30x Location redirects |
| `--max-redirects=N` | Limit redirects (default: 30) |
| `--all` | Show intermediary redirect responses |
| `307`/`308` | Method and body are reused |
| Other 3xx | Body-less GET is used for the redirect |
## Carapace Completion
The carapace completer does not complete `--proxy` flag values (free-form input). The `--default-scheme` flag is completed with `http://` and `https://`.
## References
- Source of truth: <https://httpie.io/docs/cli/config>
- Environment variables: <https://httpie.io/docs/cli> (Environment variables section)
- Carapace completer: `completers/common/http_completer/cmd/root.go`
## Related Skills
- [sessions.md](sessions.md) — session storage directory
- [ssl.md](ssl.md) — `REQUESTS_CA_BUNDLE`
- [plugins.md](plugins.md) — `plugins_dir`
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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 implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |