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/url-syntax.md
View on GitHub# URL Syntax and Defaults
HTTPie's URL handling — default schemes, localhost shortcuts, query parameters, path normalization, and custom protocol schemes.
## Default Scheme
The `http` command defaults to `http://` and the `https` command defaults to `https://`:
```bash
$ http example.org # → http://example.org
$ https example.org # → https://example.org
```
Override the default scheme with `--default-scheme`:
```bash
$ http --default-scheme=https example.org # → https://example.org
```
The carapace completer completes `--default-scheme` with `http://` and `https://`.
## Localhost Shortcuts
HTTPie provides shortcuts for localhost URLs:
| Shortcut | Expands To |
|----------|-----------|
| `:/foo` | `http://localhost/foo` |
| `:3000/bar` | `http://localhost:3000/bar` |
| `:` | `http://localhost/` |
| `:8080` | `http://localhost:8080/` |
```bash
$ http :/foo # → http://localhost/foo
$ http :3000/api/v1 # → http://localhost:3000/api/v1
$ http : # → http://localhost/
```
## Keeping `://`
A space between the scheme and `://` is equivalent to using `://` directly:
```bash
$ https ://example.org # Same as https://example.org
$ http ://example.org # Same as http://example.org
```
## Query String Parameters
URL parameters can be specified via the `==` request item (see [request-items.md](request-items.md)) instead of embedding them in the URL:
```bash
$ http https://api.github.com/search/repositories q==httpie per_page==1
```
HTTPie auto-URL-escapes special characters in `==` parameter values.
Read a query parameter value from a file using `==@`:
```bash
$ http pie.dev/get token==@files/token.txt
```
## Path Normalization
By default, HTTPie squashes dot segments (`/../` and `/./`) in URLs:
```bash
$ http example.org/foo/../bar # → http://example.org/bar
$ http example.org/foo/./bar # → http://example.org/foo/bar
```
Disable this with `--path-as-is`:
```bash
$ http --path-as-is example.org/foo/../bar # → http://example.org/foo/../bar
```
## Custom Protocol Schemes
Plugins can add custom URL scheme prefixes. For example, `httpie-unixsocket` adds `http+unix://`:
```bash
$ http http+unix://%2Fvar%2Frun%2Fdocker.sock/info
```
Create a convenience alias:
```bash
$ alias http-unix='http --default-scheme="http+unix"'
$ http-unix %2Fvar%2Frun%2Fdocker.sock/info
```
See [plugins.md](plugins.md) for transport plugin details.
## Carapace Completion
The carapace completer provides URL completion via `http.ActionUrls()` from `pkg/actions/net/http/url.go`. This action completes known hosts and ports as URLs. The first positional argument can be either an HTTP method or a URL:
```go
carapace.Gen(rootCmd).PositionalCompletion(
carapace.Batch(
http.ActionRequestMethods(),
http.ActionUrls(),
).ToA(),
carapace.ActionCallback(func(c carapace.Context) carapace.Action {
// If first arg is a method, second is URL; otherwise request items
if _, ok := requestMethods[c.Args[0]]; ok {
return http.ActionUrls()
}
return ActionRequestItem()
}),
)
```
## References
- Source of truth: <https://httpie.io/docs/cli> (URL syntax section)
- Carapace completer: `completers/common/http_completer/cmd/root.go`
- URL action: `pkg/actions/net/http/url.go`
## Related Skills
- [cli.md](cli.md) — full flag reference including `--default-scheme`
- [request-items.md](request-items.md) — `==` URL parameters
- [plugins.md](plugins.md) — custom transport schemes
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 |