Pikkola Request Studio, tool No. 44

One command, every part in view.

Paste a curl command and each flag falls into the part it sets: the method, the address, the query, the headers, the credentials, the body. Change a part and the command is written again, quoting included, or take the same request as code in eight languages. Nothing leaves this tab.

8
languages out
5
presets
0
requests sent

The command

Paste it, and it comes apart

The line is read the way a shell hands it to curl: quoted arguments, a backslash at the end of a line, a value attached to its flag. Each part is then shown where curl would put it.

Start from

Quotes, a backslash at the end of a line and a value attached to its flag are all read. A flag this page does not understand is named in the notes rather than guessed at.

The parts

Paste a command and its parts appear here.

    The builder

    Change a part, keep the command

    Every control here is one part of the request. The command on the right is written from them, quoting included, so it can go back into a terminal as it stands.

    Query
    Headers
    Body
    Credentials
    Flags

    The same request

    Eight languages, from one request

    The code is generated from the parts above rather than written by hand: the method, the headers, the credentials and the body arrive in the shape each client expects. Copy it and check it against your own style.

    
          

    How it is read

    Three habits of the command line

    01

    A flag owns the next word

    Unless it is written with an equals sign or attached to a short flag, the value is the argument after the flag. -H, --header and --header= all set one header, and a cluster such as -sSL is three flags.

    02

    Quotes are the shell's, not curl's

    By the time curl sees an argument the quotes are gone. Single quotes keep everything literally, double quotes still expand a variable, and a backslash at the end of a line only joins the next line.

    03

    The body decides the method

    A GET with a body quietly sends it as a query string, which is what -G does on purpose. Data or a form makes a POST, an upload makes a PUT, and -X overrides them all even when it contradicts the body.

    The flags this page reads
    Flag What it sets In the request
    -X, --requestThe method, whatever the body suggestsmethod
    -H, --headerOne header; a repeated name replaces the earlier oneheaders[]
    -d, --dataThe body; repeated values are joined with &body
    --data-urlencodeThe body, encoded once before it is sentbody
    --jsonThe body, with a JSON content type and acceptbody, headers[]
    -F, --formOne multipart part, a text field or a filebody.fields[]
    -u, --userBasic credentialsauth
    -b, --cookieA Cookie header, or a file of cookiesheaders[]
    -L, --locationRedirects are followed, so the final response is the one you seeflags
    -k, --insecureAny certificate is accepted, including one that should not beflags
    -I, -G, -A, -eA HEAD request, data moved into the query, a user agent, a referermethod, query, headers[]

    Questions

    Is the command I paste uploaded?

    No. It is read in this tab and the draft is kept in this browser's local storage so a reload does not lose it. The page's own content policy sets connect-src to none, so a request could not leave even if one were attempted.

    Why does the generated command differ from mine?

    Order and quoting are normalised, and comments, -v and flags this page does not read are dropped. The request is the same: same method, same address, same headers, same body. --request is left out of a GET because GET is what curl does when nothing is said.

    What is not understood?

    Shell variables, command substitution, a body read from a file with @, --next and config files. They are named in the notes under the parts rather than guessed at. A variable that was already expanded by your shell arrives as its value, which is what curl would have received.

    Which languages come out?

    JavaScript fetch, TypeScript fetch, Axios, Python requests, Python httpx, Go net/http, Node undici and HTTPie. Eight, all generated from the same request.

    Does the page send the request?

    No. Nothing here is fetched. A live request is a test, and a test belongs to the tool you already trust; this page only writes the line and the code.

    Why does my key appear in the generated code?

    Because it was in the command. A key written into a command is also written into the shell history and visible in the process list while it runs, so a placeholder or an environment variable is the safer habit. The page cannot tell which string is a secret and which is an id.

    Form or multipart?

    -d sends an urlencoded form, which is what most form posts are. -F sends multipart, which is what a file upload needs. The builder keeps them apart because the code for each is different.