Requests

A request step sends one HTTP request. Click it in the flow to edit it on the right; the editor's tabs hold everything a request can do.

The request editor of the Log in request, on the Body tab, with a JSON body
The request editor, Body tab. Changes apply when you click Save Changes (or press Ctrl+S, which also saves the flow); Cancel Editing drops them, and Esc asks before it does.

The tabs

TabWhat it holdsMore
RequestName, method, URL, query parameters, headers, run conditional, follow redirects, HTTP versionbelow
AuthInherit the flow's auth, none, Basic, Bearer, API key or OAuth 2.0Auth
BodyRaw text (JSON, XML…), a multipart form, a file, or GraphQLbelow
ExtractCapture values from the response into variablesExtraction
ChecksRules the response must meetChecks
LoopRepeat until the expected statusRetries
ResponseRead the response as an event stream (SSE); save the response body to a fileServer-sent events, Files

A tab's label shows what is set: Checks (3), Body · raw, Loop · on.

Method, URL, parameters and headers

Methods: GET, POST, PUT, PATCH, DELETE, HEAD and OPTIONS. Write variables anywhere: $baseUrl/users/$userId. They are replaced when the request is sent.

Parameters are URL-encoded for you. A GET sends them in the query string. Other methods send them as a form body (application/x-www-form-urlencoded), unless the request has a body of its own (raw, multipart, file or GraphQL); then they go to the query string too.

Headers are name / value rows. A header you set wins over the one CLEM would add (for example Authorization over the Auth tab, or Content-Type).

Unless the request sets them, every request sends Accept: */* (as Postman and curl do) and User-Agent: CLEM/<version> (+https://clemflows.com). Some sites refuse requests from a generic library's User-Agent; give the request its own User-Agent header when an API asks for one with your contact details.

Paste a curl command into the URL field: CLEM fills in the method, URL, headers and body, and keeps the request's checks, extract rules and loop. Import from cURL.

Bodies

On the Body tab, Send picks the kind:

SendFor
RawJSON, XML, plain text: whatever you type, with $vars filled in. Set the Content-Type header to match (for JSON, application/json).
Multipart formText and file fields, like an HTML upload form. Uploads.
FileThe bytes of one file are the whole body (for example a PUT of an image).
GraphQLA query and its variables. GraphQL.

A WebSocket is a step of its own: Add WebSocket in the left menu's WebSocket section (WebSocket).

In a JSON body, a variable in quotes is text and without quotes a value: with $price = 12.5, "price": $price sends the number 12.5.

Test Request

Test Request sends the request once, with the current variables, environment and auth, and shows the result under the editor: the status, time, headers and body, what each extraction would capture, and which checks pass. Nothing else in the flow runs, and the flow's variables don't change.

Test Result under the request editor: status 200, the extractions and the passed checks
Test Request on the Log in step: the token it would capture and the checks it passes.

A value from an earlier step (a token from a login, say) is whatever the variable holds now: run the flow once, or set it in Variables.

Other options

Working with steps

Delays

Add Delay adds a pause of a number of milliseconds, for an API that needs a moment (an index to update, a job to start). In code, await sleep(500) does the same.