http
Send HTTP requests from the command line
TLDR
Make a simple GET request (shows response headers and content)
Print specific parts of the content (H: request headers, B: request body, h: response headers, b: response body, m: response metadata)
Specify the HTTP method when sending a request and use a proxy to intercept the request
Follow any 3xx redirects and specify additional headers in a request
Authenticate to a server using different authentication methods
Construct a request but do not send it (similar to a dry-run)
Use named sessions for persistent custom headers, auth credentials and cookies
Upload a file to a form (the example below assumes that the form field is )
SYNOPSIS
http [OPTIONS]... URL [KEY=VALUE [KEY=VALUE...]]
PARAMETERS
-v, --verbose
Print verbose request/response details.
-q, --quiet
Silence httpie output; headers sent to stderr.
-j, --json
Send data as JSON (default if data detected).
-f, --form
Send form-encoded data.
-d, --download
Download files; auto-detects filename.
-o FILE, --output FILE
Save response body to FILE.
--print [H]B[h][j]
Specify output: H=headers, B=body, h=status, j=JSON.
-a USER:PASS, --auth USER:PASS
Use Basic authentication.
--session SESSION
Load/save cookies/auth to session file.
-X METHOD
Request method (GET, POST, PUT, etc.).
-h, --help
Show help.
--version
Show version.
DESCRIPTION
The http command, part of the httpie tool, is a cURL-like utility designed for painless HTTP testing and troubleshooting. Unlike traditional tools like curl, it offers a simple, intuitive syntax with features like colorized JSON output, automatic JSON detection, and progress bars. It simplifies API interactions by allowing key=value pairs for headers, data, and parameters directly after the URL.
Key strengths include human-readable output, session support for cookies/auth, support for forms, file uploads, and plugins. It's ideal for developers testing REST APIs, debugging webhooks, or scripting HTTP requests. Install via pip (pip install httpie) or package managers. Output can be formatted as JSON, XML, or plain text, with options for verbose logging and offline mode simulation.
CAVEATS
Not installed by default; requires httpie package. Sensitive data like passwords visible in verbose output or process lists. Large downloads may consume memory without --stream.
BASIC USAGE EXAMPLES
GET request: http example.com
POST JSON: http POST pie.dev/post data='{"key":"val"}'
With headers: http example.com Accept:application/json X-API-Key:123
PLUGIN ECOSYSTEM
Extensible via plugins for OAuth, AWS auth, etc. See httpie.io/plugins.
HISTORY
Developed by Jakub Roztočil in 2011 as a friendly cURL alternative. First release 0.1 in 2012; now at v3.x with HTTP/2, plugins, and OAuth support. Widely used in DevOps and API testing.


