Skip to content

Commit 9b336b1

Browse files
akoclaude
andcommitted
docs: add SEND REST REQUEST (with WITH clause), TRANSFORM to rest.txt help
The syntax help was missing: - SEND REST REQUEST Module.Service.Op; - WITH (\$param = expr, ...) clause for parameters - BODY \$var clause - \$latestHttpResponse system variable note - TRANSFORM action Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 494dfb5 commit 9b336b1

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

cmd/mxcli/help_topics/rest.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,24 @@ JSON STRUCTURES & MAPPINGS
140140
MICROFLOW ACTIONS
141141
-----------------
142142

143+
-- Call a REST client operation (fire and forget)
144+
SEND REST REQUEST Module.API.GetData;
145+
146+
-- With query/path parameters and output variable
147+
$Result = SEND REST REQUEST Module.API.GetForecast
148+
WITH ($latitude = toString(51.92), $longitude = toString(4.48),
149+
$units = 'metric');
150+
151+
-- With request body (for POST/PUT/PATCH operations)
152+
$Result = SEND REST REQUEST Module.API.CreateItem BODY $NewItem;
153+
154+
-- After any SEND REST REQUEST, response is in $latestHttpResponse:
155+
-- $latestHttpResponse/Content (String — response body)
156+
-- $latestHttpResponse/StatusCode (Integer)
157+
158+
-- Transform JSON with a data transformer (Mendix 11.9+)
159+
$Simplified = TRANSFORM $RawJson WITH Module.SimplifyTransformer;
160+
143161
-- Import from mapping (JSON string → entities)
144162
$Pet = IMPORT FROM MAPPING Module.IMM_Pet($JsonContent);
145163

0 commit comments

Comments
 (0)