http(1) HTTPie Manual http(1) (NAME) http - HTTP API (SYNOPSIS) http [METHOD] URL [REQUEST_ITEM ...] (DESCRIPTION) HTTPie: HTTP API. (POSITIONAL ARGUMENTS) . URL . METHOD HTTP (GET, POST, PUT, DELETE, ...). HTTPie POST GET: $ http example.org # => GET $ http example.org hello=world # => POST URL (URL) . 'http://' . ( : --default-scheme=http/https) localhost : $ http :3000 # => http://localhost:3000 $ http :/foo # => http://localhost/foo REQUEST_ITEM - . : ':' HTTP: Referer:https://httpie.io Cookie:foo=bar User- Agent:bacon/1.0 '==' URL URI : search==httpie '=' JSON ( --json, -j) ( --form, -f): name=HTTPie language=Python description='CLI HTTP client' ':=' JSON ( --json, -j): awesome:=true amount:=42 colors:='["red", "green", "blue"]' '@' ( --form --multipart): cv@~/Documents/CV.pdf cv@'~/Documents/CV.pdf;type=application/pdf' '=@' '=' : essay=@Documents/essay.txt ':=@' JSON ':=' : package:=@./package.json : field-name-with\:colon=value (PREDEFINED CONTENT TYPES) --json, -j () JSON . Content-Type Accept ( ) application/json . --form, -f . Content-Type ( ) application/x-www-form-urlencoded . multipart/form-data . --multipart --form multipart/form-data ( ). --boundary (boundary) multipart/form-data. --form . --raw ( ): $ http --raw='data' pie.dev/post (stdin) : $ echo data | http pie.dev/post HTTPie : $ http pie.dev/post @data.txt (CONTENT PROCESSING OPTIONS) --compress, -x () Deflate. Content-Encoding deflate . . . (OUTPUT PROCESSING) --pretty . "none" ( ) "all" ( ) "colors" "format" . --style, -s STYLE ( "auto" ). : auto, pie, pie-dark, pie-light, solarized : $ http --style "auto" ANSI . -auto $TERM "xterm-256color" ( `export TERM=xterm-256color' ~/.bashrc ). --unsorted . : --format-options=headers.sort:false,json.sort_keys:false --sorted . : --format-options=headers.sort:true,json.sort_keys:true --response-charset ENCODING : --response-charset=utf8 --response-charset=big5 --response-mime MIME_TYPE MIME : --response-mime=application/json --response-mime=text/xml --format-options . --pretty=all --pretty=format ( ) . : headers.sort:true json.format:true json.indent:4 json.sort_keys:true xml.format:true xml.indent:2 . JSON : --format-options json.sort_keys:false,json.indent:2 . (OUTPUT OPTIONS) --print, -p WHAT : 'H' 'B' 'h' 'b' 'm' 'hb' ( ) . . --headers, -h . --print=h. --meta, -m . --print=m. --body, -b . --print=b. --verbose, -v . ( `-v`/`--verbose`) . ( ) . . : --all --print=BHbh : --all --print=BHbhm --all / . / . ( --follow) (--auth=digest) . --stream, -S `tail -f'. --stream --pretty ( ) HTTPie . API . --pretty : (flush) . --output, -o FILE FILE (stdout). --download FILE . HTTP (stderr) . --download, -d . --output [filename] . wget . --continue, -c . --output . --quiet, -q stdout stderr . . --output . . (SESSIONS) --session SESSION_NAME_OR_PATH . . : [HTTPIE_CONFIG_DIR]//.json HTTPIE_CONFIG_DIR : https://httpie.io/docs/cli/config-file-directory --session-read-only SESSION_NAME_OR_PATH /. (AUTHENTICATION) --auth, -a USER[:PASS] | TOKEN / ( basic digest) (-a username) HTTPie . --auth-type, -A . "basic" . "basic": Basic HTTP "digest": Digest HTTP "bearer": Bearer HTTP ( ) : $ http --auth-type --ignore-netrc .netrc. (NETWORK) --offline . --proxy PROTOCOL:PROXY_URL URL ( http:http://foo.bar:3128). . $ALL_PROXY $HTTP_PROXY $HTTPS_proxy . --follow, -F 30x Location. --max-redirects ( --follow ). --max-headers ( ). --timeout SECONDS () . . ( ). --check-status HTTPie . HTTPie HTTP . 4xx ( ) 5xx ( ) HTTPie . 3xx ( ) --follow . (stderr) . --path-as-is (/../ /./) URL. --chunked (chunked transfer encoding). Transfer-Encoding chunked . SSL (SSL) --verify "no" ( "false") SSL . "yes" ( "true") . CA_BUNDLE . ( REQUESTS_CA_BUNDLE ). --ssl . SSL v2.3 OpenSSL . OpenSSL ( ). --ciphers OpenSSL. `http --help` . --cert SSL . --cert-key . --cert-key SSL. --cert . --cert-key-pass (passphrase) . --cert-key . . (TROUBLESHOOTING) --ignore-stdin, -I stdin. --help . --manual . --version . --traceback (exception) . --default-scheme URL . --debug HTTPie . (SEE ALSO) --OPTION --no-OPTION OPTION . : HTTPie 3.2.4 2024-07-10 http(1)