LinuxCommandLibrary

http

TLDR

GET request

$ http [https://api.example.com/users]
copy
POST with JSON
$ http POST [url] name=value
copy
POST with form data
$ http --form POST [url] field=value
copy
Custom headers
$ http [url] Authorization:"Bearer token"
copy
Download file
$ http --download [url]
copy
Verbose output
$ http --verbose [url]
copy

SYNOPSIS

http [options] [method] url [data]

DESCRIPTION

HTTPie (http) is a user-friendly HTTP client. It provides intuitive syntax, colorized output, and JSON support for API interaction.
The tool simplifies making HTTP requests from the command line. It automatically formats responses and supports sessions and authentication.
HTTPie is a friendly HTTP client.

PARAMETERS

METHOD

HTTP method (GET, POST, PUT, DELETE).
URL
Request URL.
DATA
Request data (key=value pairs).
-d, --download
Download file.
-f, --form
Form encoded data.
-j, --json
JSON data.
-v, --verbose
Verbose output.
-o, --output FILE
Output file.
--help
Display help information.

CAVEATS

Python package. Different from curl syntax. JSON by default.

HISTORY

HTTPie was created by Jakub Roztocil as a more user-friendly alternative to curl for API testing.

SEE ALSO

curl(1), wget(1), https(1)

Copied to clipboard