HTTPie Command Generator

HTTPie writes requests as short, readable commands, but its item syntax (=, :=, ==, :) is easy to mix up. Fill in the request here and get the HTTPie command with each JSON field typed correctly, query parameters as ==, and auth passed with -a. The same form also writes cURL, fetch() and Axios.

Query parameters
Headers
Authentication
Body
Output

Writing the code runs in your browser. What you type never leaves this device.

This page only writes the code. It never sends your request or sees your token.

Features

  • Flat JSON objects become typed items: strings with =, numbers, booleans and objects with :=

  • Query parameters as key==value

  • Headers as Name:value

  • Bearer token with -A bearer -a, basic auth with -a user:password

  • --form and --multipart for form posts and file uploads

  • Arrays and raw text sent with --raw

Why developers use HTTPie

Exploring an API by hand

Colourised, formatted JSON responses make it easier to read what an endpoint returns than plain cURL output.

Readable examples in docs

A short HTTPie command is easier to read in a README than a long cURL line with escaped JSON.

Quick checks during development

Hit a local endpoint with a few typed fields without writing a JSON file.

HTTPie item syntax

The separators

  • name=Asha sends a JSON string field.
  • qty:=2 and paid:=true send raw JSON (numbers, booleans, arrays, objects).
  • page==2 adds a query parameter.
  • Accept:application/json sets a header.
  • With --form, [email protected] uploads a file.

Method and defaults

HTTPie sends GET when there is no data and POST when there is, so the method is only written when it differs. JSON is the default body format and it sets Accept and Content-Type to JSON for you. Install it with pip install httpie, brew install httpie, or your package manager; the command is http (and https).

HTTPie Command Generator - FAQ