id = "httpie"
name = "HTTPie"
homepage = "https://httpie.io/cli"
description = "HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client."
icon = "SimpleIcons:httpie"
executables = ["http", "https", "httpie"]
[dotfiles]
paths = [
"[configHome]/httpie/config.json",
"~/.httpie/config.json",
]
secret = [
"[configHome]/httpie/sessions/",
"~/.httpie/sessions/",
]
side_effect = false
[commands]
format = 1
label = "Send an HTTP request"
description = "Build an HTTP request with method, URL and request items (headers, query, JSON and form data). Sessions, TLS, proxy and format options are left out."
quality = "ai-draft"
base = "fig:http"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/http.ts"
license = "MIT"
[[commands.field]]
id = "method"
label = "Method"
type = "string"
description = "HTTP method; defaults to GET, or POST when data items are given."
position = 0
suggestions = [{ value = "GET", label = "GET" }, { value = "POST", label = "POST" }, { value = "PUT", label = "PUT" }, { value = "PATCH", label = "PATCH" }, { value = "DELETE", label = "DELETE" }, { value = "HEAD", label = "HEAD" }]
sources = ["fig"]
[[commands.field]]
id = "url"
label = "URL"
type = "url"
position = 1
description = "The scheme defaults to 'http://' if the URL does not include one."
sources = ["fig"]
[[commands.field]]
id = "items"
label = "Request items"
type = "string"
description = "Key-value items: Header:value, param==value, field=value (JSON/form string), field:=json, field@file."
position = 2
multiple = true
sources = ["fig"]
[[commands.field]]
id = "json"
label = "Send as JSON"
type = "boolean"
option = ["--json", "-j"]
description = "Serialize data items as a JSON object (the default when data is given)."
sources = ["fig"]
[[commands.field]]
id = "form"
label = "Send as form"
type = "boolean"
option = ["--form", "-f"]
description = "Serialize data items as form fields."
sources = ["fig"]
[[commands.field]]
id = "auth"
label = "Credentials"
type = "string"
option = ["--auth", "-a"]
description = "USER[:PASS]; if only the username is given HTTPie prompts for the password."
sources = ["fig"]
[[commands.field]]
id = "auth_type"
label = "Auth type"
type = "enum"
option = ["--auth-type", "-A"]
choices = [{ value = "basic", label = "Basic" }, { value = "digest", label = "Digest" }]
sources = ["fig"]
[[commands.field]]
id = "follow"
label = "Follow redirects"
type = "boolean"
option = ["--follow", "-F"]
description = "Follow 30x Location redirects."
sources = ["fig"]
[[commands.field]]
id = "headers"
label = "Response headers only"
type = "boolean"
option = ["--headers", "-h"]
description = "Print only the response headers."
sources = ["fig"]
[[commands.field]]
id = "body"
label = "Response body only"
type = "boolean"
option = ["--body", "-b"]
description = "Print only the response body."
sources = ["fig"]
[[commands.field]]
id = "verbose"
label = "Verbose"
type = "boolean"
option = ["--verbose", "-v"]
description = "Print the whole request as well as the response."
sources = ["fig"]
[[commands.field]]
id = "download"
label = "Download"
type = "boolean"
option = ["--download", "-d"]
description = "Do not print the body; download it to a file."
sources = ["fig"]
[[commands.field]]
id = "output"
label = "Output file"
type = "path"
option = ["--output", "-o"]
description = "Save output to this file instead of stdout."
path = { kind = "file", role = "output" }
effect = "overwrite"
sources = ["fig"]
[[commands.field]]
id = "check_status"
label = "Fail on HTTP errors"
type = "boolean"
option = ["--check-status"]
description = "Exit with an error if the HTTP status indicates one."
sources = ["fig"]
[[commands.field]]
id = "offline"
label = "Offline"
type = "boolean"
option = ["--offline"]
description = "Build the request and print it but do not send it."
sources = ["fig"]
[[commands.field]]
id = "timeout"
label = "Timeout (seconds)"
type = "number"
option = ["--timeout"]
description = "Connection timeout in seconds; 0 means no limit."
sources = ["fig"]
[[commands.task]]
id = "get"
label = "GET a URL"
set = { method = ["GET"] }
fields = ["url", "items", "follow", "headers", "verbose"]
required = ["url"]
[[commands.task]]
id = "post-json"
label = "POST JSON"
set = { method = ["POST"], json = [true] }
fields = ["url", "items", "auth", "verbose"]
required = ["url"]
[[commands.task]]
id = "preview"
label = "Preview without sending"
set = { offline = [true] }
fields = ["method", "url", "items", "json", "form"]
required = ["url"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["method", "url", "items", "json", "form", "auth", "follow", "verbose"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["auth_type", "headers", "body", "download", "output", "check_status", "offline", "timeout"]