ApiResponse

Family: Studio · One form

What it does

Returns the body of an API task's answer, as text.

Syntax

ApiResponse(tache integer) → string

Parameters

NameTypeMeaning
tacheintegerThe task id returned by ApiRequest().

Every form returns

string

The response body, or an empty string while the task runs or if it failed.

Good to know

  • Editor and HTML5 exports only: native (Bevy) builds stop with an unsupported-command error.

Example · generated

DO  Print(ApiResponse(1))  Sync()LOOP

ApiResponse is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

Related commands

133 commands in Studio