curlrequest: members
10 implemented, 0 reserved. Entries are sorted by name.
Implemented
Section titled “Implemented”curlrequest.data: string
Runs on: server only. Origin: compatibility. Since: M12. Playground: no. read-only.
The response body, bytes as they arrived.
echo(temp.req.data);Specification: standard-library.md§14.1.
curlrequest.error: string
Runs on: server only. Origin: engine extension. Since: M12. Playground: no. read-only.
Why the request failed, else empty: a host outside the allow list, a bad header line, a refused redirect, too many redirects, a response over 10 MiB, a timeout, or a transport error.
if (temp.req.error != "") echo(temp.req.error);Specification: standard-library.md§14.1.
headers
Section titled “headers”curlrequest.headers: array
Runs on: server only. Origin: compatibility. Since: M12. Playground: no.
Complete header lines to send, such as “Accept: text/plain”. Host, Content-Length, Transfer-Encoding, and Connection are refused; a line with a line break fails the request.
temp.req.headers = {"Accept: application/json"};Specification: standard-library.md§14.1.
curlrequest.post: boolean
Runs on: server only. Origin: compatibility. Since: M12. Playground: no.
true sends a POST with postdata as the body; the default is a GET.
temp.req.post = true;Specification: standard-library.md§14.1.
postdata
Section titled “postdata”curlrequest.postdata: string
Runs on: server only. Origin: compatibility. Since: M12. Playground: no.
The body of a POST. Without a Content-Type header it is sent as application/x-www-form-urlencoded.
temp.req.postdata = "a=1&b=2";Specification: standard-library.md§14.1.
curlrequest.quick: boolean
Runs on: server only. Origin: compatibility. Since: M12. Playground: no.
true shortens the whole-request time limit from 30 s to 5 s. Provisional meaning (OQ-STD-22).
temp.req.quick = true;Specification: standard-library.md§14.1.
returncode
Section titled “returncode”curlrequest.returncode: number
Runs on: server only. Origin: compatibility. Since: M12. Playground: no. read-only.
The HTTP status code of the final response, or 0 when the request was refused or failed.
if (temp.req.returncode == 200) echo(temp.req.data);Specification: standard-library.md§14.1.
sendrequest
Section titled “sendrequest”curlrequest.sendrequest() -> number
Runs on: server only. Origin: compatibility. Since: M12. Playground: no.
Sends the request as the fields describe it: GET, or POST with postdata when post is true. The URL must pass the allow list, at most 5 redirects are followed and each must pass it too, the response is limited to 10 MiB and 30 s (5 s with quick). onReceiveData fires on the request when it finishes; a failure leaves returncode 0 and the reason in error. One object may have 32 pending requests.
temp.req = new TCURLRequest(); temp.req.url = "https://api.example.com/v1/score"; temp.req.post = true; temp.req.postdata = "name=" @ player.account; temp.req.sendrequest(); temp.done = await temp.req;Specification: standard-library.md§14.1.
skipsslverification
Section titled “skipsslverification”curlrequest.skipsslverification: boolean
Runs on: server only. Origin: compatibility. Since: M12. Playground: no.
true accepts a server certificate that does not verify. Its use is logged once per host per hour.
temp.req.skipsslverification = false;Specification: standard-library.md§14.1.
curlrequest.url: string
Runs on: server only. Origin: compatibility. Since: M12. Playground: no.
The URL to request; http or https, with a host from Server Options httpallowlist.
temp.req.url = "https://api.example.com/items";Specification: standard-library.md§14.1.
Engine version 0.1.0. Built 2026-11-18.