https

alias or variant of HTTPie for HTTPS requests

TLDR

GET request over HTTPS
$ https [https://api.example.com/users]
POST with JSON
$ https POST [url] name=value
Skip certificate verification
$ https --verify no [url]
Custom headers
$ https [url] Authorization:"Bearer token"
Download file
$ https --download [url]

SYNOPSIS

https [options] [method] url [data]

DESCRIPTION

https is a companion executable installed alongside HTTPie. It is functionally identical to the http command, except the default URL scheme is https:// instead of http://, so a bare hostname like `https example.org` requests `https://example.org`. All other behavior, options, and output formatting are shared with http.Like HTTPie generally, it provides colorized, formatted output, intuitive key=value/key:value syntax for building requests, JSON support by default, and features like sessions, downloads, and authentication.

PARAMETERS

METHOD

HTTP method (GET, POST, PUT, DELETE, etc.). Inferred from the presence of data if omitted.
URL
Request URL. The https:// scheme is assumed when none is given.
DATA
Request items: `key=value` for JSON/form fields, `key:value` for headers, `key==value` for query params, `key@file` for file uploads.
-j, --json
Encode data items as a JSON object (default).
-f, --form
Encode data items as `multipart/form-data` or `application/x-www-form-urlencoded`.
-o, --output FILE
Write output to a file instead of stdout.
-d, --download
Download the response body as a file, like a resumable wget.
-v, --verbose
Print the whole request as well as the response.
-p, --print FLAGS
Control what's printed: `H`/`B` for request headers/body, `h`/`b` for response headers/body.
-a, --auth USER[:PASS]
Basic or digest authentication credentials.
--session NAME
Create or reuse a named session, persisting cookies and headers between requests.
--verify yes|no|CABUNDLE_
SSL certificate verification; set to no to skip, or point at a custom CA bundle.
--cert FILE
Client-side SSL certificate.
--cert-key FILE
Private key file for the client certificate, if not bundled with --cert.
--proxy PROTOCOL:URL
Proxy to use for the given protocol.
--follow
Follow HTTP redirects (30x responses).
--offline
Build and print the request without sending it over the network.
--help
Display help information.

INSTALL

sudo dnf install httpie
sudo pacman -S httpie
sudo apk add httpie
sudo zypper install httpie
brew install httpie
nix profile install nixpkgs#httpie

CAVEATS

Not a shell alias but a separate entry point shipped by the httpie Python package; installing HTTPie installs both http and https. Equivalent to running `http --default-scheme=https`.

HISTORY

https has been bundled with HTTPie since its early releases, created by Jakub Roztocil as a more user-friendly alternative to curl for command-line HTTP/API testing.

SEE ALSO

http(1), curl(1), wget(1)

RESOURCES

Source code · Homepage · Documentation