http https://api.example.com/healthSends a basic GET request to the specified URL using default settings.
A human-friendly HTTP client with intuitive syntax, JSON support and coloured output — great for exploring APIs.
sudo apt install httpiehttp https://api.example.com/healthSends a basic GET request to the specified URL using default settings.
http GET https://api.example.com/usersExplicitly specifies the GET method for clarity when fetching resources.
http POST https://api.example.com/users name="John Doe"Sends a POST request with a JSON body containing a string field.
http PUT https://api.example.com/users/1 active:=trueSends a PUT request using non-string JSON data types like booleans.
http DELETE https://api.example.com/users/1Sends a DELETE request to remove a resource.
http PATCH https://api.example.com/users/1 email="new@example.com"Sends a PATCH request to partially update a resource.
http HEAD https://api.example.com/large-file.zipRetrieves only the headers of a resource without downloading the body.
http OPTIONS https://api.example.com/usersQueries the supported HTTP methods for a specific endpoint.
http POST https://api.example.com/orders id:=42 price:=19.99Constructs a JSON body with integer and float values using the colon-equals syntax.
http POST https://api.example.com/config settings:='{"theme": "dark"}'Embeds a raw JSON object inside a specific field of the request payload.
http POST https://api.example.com/data items:='[1, 2, 3]'Sends a JSON array within a specific field of the request body.
http POST https://api.example.com/users null:=null empty:=""Sends explicit null values and empty strings in a JSON payload.
http POST https://api.example.com/math pi:=3.14159Sends floating point numbers directly in the JSON body.
http POST https://api.example.com/array list:='[{"id":1}, {"id":2}]'Sends a list of objects within a JSON field.
http POST https://api.example.com/hook payload:='{"a": [1,2], "b": {"c": 3}}'Sends complex nested JSON structures in a single command.
http -f POST https://api.example.com/login username=admin password=secretSubmits data as 'application/x-www-form-urlencoded' instead of JSON.
http https://api.example.com/secure X-API-Key:123456Adds a custom HTTP header to the request using the colon syntax.
http https://api.example.com/mobile User-Agent:iOS/15.0Overrides the default User-Agent header to simulate a different client.
http https://api.example.com/resource If-None-Match:"etag_value"Sends conditional headers to check for resource updates.
http https://api.example.com/protected Authorization:"Bearer mytoken"Manually sets the Authorization header for token-based access.
http https://api.example.com header-with-empty-value:Sends a header with an empty value.
http https://api.example.com header-to-remove:Removes a default header (like Accept-Encoding) by setting it to empty.
http POST https://api.example.com/upload @/path/to/data.jsonUploads the contents of a file as the raw request body.
http -f POST https://api.example.com/upload profile_pic@/path/to/image.pngUploads a file as a field in a Multipart-Encoded form.
http --form POST https://api.example.com/upload file@/dev/nullSimulates a file upload with an empty file.
http -a user:password https://api.example.com/protectedPerforms Basic Authentication with the provided username and password.
http -a user https://api.example.com/protectedPrompts interactively for the password for Basic Authentication.
http -A digest -a user:pass https://api.example.com/digest-authUses Digest Authentication instead of the default Basic Auth.
http -A bearer -a 'token_string' https://api.example.com/apiSimplifies Bearer Token authentication syntax.
http --session=logged-in -a user:pass https://api.example.com/loginCreates a named session that persists cookies and auth headers.
http --session=logged-in https://api.example.com/dashboardReuses an existing session to maintain state across requests.
http --session-read-only=logged-in https://api.example.com/viewUses a session's cookies but does not save any new cookies received.
http --session=secure_user --ssl=tls1.3 https://api.example.com/profileSaves a session that forces TLS 1.3 for future requests.
http -v https://api.example.com/debugPrints the whole HTTP exchange (request and response) for debugging.
http -h https://api.example.com/headersPrints only the response headers, suppressing the body.
http -b https://api.example.com/jsonPrints only the response body, suppressing the headers.
http -p Hh https://api.example.com/tracePrints request headers (H) and response headers (h) only.
http --style=solarized https://api.example.com/colorChanges the syntax highlighting color scheme of the output.
http --pretty=none https://api.example.com/rawDisables all formatting and colors for raw output.
http --pretty=format https://api.example.com/dataApplies formatting to the JSON output but disables colors.
http --print=b --pretty=format https://api.example.com/data > output.jsonSaves only the formatted response body to a file for later inspection.
http --print=HB https://api.example.comPrints the request headers (H) and request body (B) only.
http --stream https://api.example.com/eventsStreams the response output line-by-line, ideal for Server-Sent Events (SSE).
http --style=monokai https://api.example.com/codeUses the Monokai color scheme for better visibility of code responses.
http --pretty=all --style=fruity https://api.example.comMaximizes readability with pretty printing and a vibrant color style.
http -d https://api.example.com/files/report.pdfDownloads the file and saves it with the filename from the Content-Disposition header.
http -o my_report.pdf https://api.example.com/files/report.pdfDownloads the file and saves it with a custom filename.
http --download --output report.pdf https://api.example.com/reportExplicit long-form command to download a resource to a file.
http -d -o archive.zip https://api.example.com/generate-zipCombines download flag with output filename for clear intent.
http --verify=no https://self-signed.local/adminSkips SSL certificate verification (insecure) for testing self-signed certs.
http --verify=/path/to/ca.pem https://internal.api.comVerifies the SSL certificate using a custom CA bundle.
http --cert=client.pem --cert-key=key.pem https://mtls.example.comUses a client certificate and private key for Mutual TLS (mTLS) authentication.
http --ssl=tls1.2 https://legacy.example.comForces a specific SSL/TLS version for the connection.
http --proxy=http:http://10.0.0.1:8080 https://api.example.comRoutes HTTP traffic through a specific proxy server.
http --proxy=https:socks5://127.0.0.1:9050 https://onion.example.comRoutes HTTPS traffic through a SOCKS5 proxy.
http --proxy-auth=user:pass --proxy=http:10.0.0.1:8080 https://api.example.comAuthenticates with the proxy server using Basic Auth.
http --proxy=http:http://user:pass@10.10.1.1:8080 https://api.example.comInline proxy authentication syntax within the proxy URL.
http --timeout=5 https://slow.example.comSets a connection and read timeout in seconds.
http --follow https://redirect.example.comAutomatically follows 30x redirects.
http --max-redirects=3 --follow https://loop.example.comLimits the number of redirects followed to prevent infinite loops.
http --ipv4 https://api.example.comForces the connection to use IPv4 only.
http --ipv6 https://api.example.comForces the connection to use IPv6 only.
http --max-redirects=0 https://api.example.com/redirectPrevents following any redirects to inspect the 3xx response directly.
http --chunked POST https://api.example.com/stream @large_file.txtForces chunked transfer encoding for uploading large files.
http -f POST https://api.example.com/search query='test' filters:='{"active":true}'Mixes form fields and JSON strings in a single form-encoded request.
cat config.json | http POST https://api.example.com/setup env==productionUploads a file via piping while simultaneously adding URL query parameters.
http --compress POST https://api.example.com/logs @large_log.txtCompresses the request body using gzip before sending.
http --quiet POST https://api.example.com/pingSuppresses all output entirely, useful for silent heartbeat scripts.
http --session=temp https://api.example.com/1 && http --session=temp https://api.example.com/2Uses a temporary named session for a quick multi-step workflow.
http --print=b https://api.example.com/ip | http POST https://api.tracker.com/log ip=@-Pipes the body of one response into a field of the next request.
http --check-status https://api.example.com/healthExits with an error code if the HTTP status is not 2xx, useful for scripts.
http --ignore-stdin https://api.example.com/testPrevents HTTPie from reading data piped to stdin.
echo '{"foo": "bar"}' | http POST https://api.example.com/pipePipes JSON from the shell directly into the request body.
http --timeout=0.1 https://local.testSets a very short timeout to test latency handling.
http --check-status --ignore-stdin GET https://healthcheck.localRobust health check command for cron jobs.
http --check-status --timeout=2 HEAD https://critical.service.localA fast, strict availability check for monitoring systems.
http POST https://api.example.com/login username=' admin'--'Injects SQL payloads into JSON fields for vulnerability testing.
http https://api.example.com/admin Cookie:session_id=admin_cookieManually injects a session cookie to test session hijacking scenarios.
http -v PUT https://api.example.com/profile Host:internal-admin.localSpoofs the Host header to test for Host Header Injection vulnerabilities.
http DELETE https://api.example.com/users/1 X-HTTP-Method-Override:PUTTests for HTTP method override vulnerabilities in APIs.
http POST https://api.example.com/xml Content-Type:application/xml @payload.xmlManually sets Content-Type to send XXE payloads via raw XML files.
http POST https://api.example.com/login 'username=admin'' OR ''1''=''1'Tests SQL injection vulnerabilities using form fields.
http GET https://api.example.com/admin 'X-Original-URL:/admin'Tests for access control bypass using framework-specific override headers.
http -v OPTIONS https://api.example.comChecks for CORS misconfigurations and allowed methods verbally.
http --print=h https://api.example.com | grep 'Strict-Transport-Security'Validates the presence of security headers in the response.
http --max-headers=1024 https://api.example.comAdjusts the maximum allowed header size to test boundary conditions.
http HEAD https://api.example.com | grep -i "server"Inspects the Server header to identify backend technology.
http --verify=no HEAD https://expired.example.comChecks connectivity to a host with an expired certificate without failing.
http -v --all https://api.example.com/suspicious-endpointCaptures the entire redirect chain and all headers for forensic analysis.
http https://api.example.com/users | http POST https://api.backup.com/usersDownloads data from one API and immediately pipes it as a POST body to another.
http --session=test https://api.example.com/token && http --session=test https://api.example.com/dataChains commands in shell using the same session for sequential testing.
http PUT https://api.example.com/items/1 updated_at:=`date +%s`Uses shell command substitution to send a current timestamp.
http --default-scheme=https example.comSets the default protocol scheme to HTTPS for the request.
http --session=logged-in DELETE https://api.example.com/logoutUses the session to call the logout endpoint before discarding the session file.
Transfers data with URLs over HTTP, FTP and many other protocols. Indispensable for testing APIs, headers and authentication.
A lightweight command-line JSON processor: filter, transform and pretty-print JSON from APIs, logs and tool output.
A non-interactive downloader for HTTP, HTTPS and FTP that can resume, retry and mirror entire websites recursively.