Skip to main content

Request Builder

Compose an HTTP request from a method, URL, query, headers and body, and copy it as a cURL command or raw HTTP.

Request

Query rows below are added to it, percent-encoded.

Query

Headers

Sent as typed. Content-Length is added for you in the HTTP view.

GET

Full URLType a URL to build the request.

Request line
—
Headers
—
Body
—

cURL

Type a URL to build the request.

HTTP

Type a URL to build the request.

Runs in your browser; nothing you enter leaves this page.

How it works

From fields to a URL

Each query row is percent-encoded (a space becomes %20, & becomes %26) and appended to the URL: after a ? if it has no query yet, after an & if it already has one. Rows without a name are left out, so half-filled rows do no harm.

The cURL command

GET needs no flag, HEAD becomes curl -I, and every other method is passed with -X. Each header goes on its own -H line and the body is sent with --data. Everything is wrapped in single quotes, and a single quote inside is written as '\'' so the command pastes safely into bash or zsh.

The raw HTTP message

The HTTP view shows what goes over the wire in HTTP/1.1: the request line with the path and query, a Host header taken from the URL (unless you set one), your headers, a Content-Length counted in UTF-8 bytes when there is a body, a blank line, then the body. The byte counts above it include the CRLF line endings HTTP uses.

Content-Length = UTF-8 bytes of the body

More tools

All 238 tools