llHTTPRequest
LSLkey llHTTPRequest(string url, list parameters, string body)
Sends an HTTP request to the specified URL with the Body of the request and Parameters.\ Returns a key that is a handle identifying the HTTP request made.
Parameters
| Type | Name | What it does |
|---|---|---|
| string | url | The address. |
| list | parameters | HTTP_METHOD, HTTP_MIMETYPE, HTTP_BODY_MAXLENGTH, HTTP_VERIFY_CERT … as key/value pairs. |
| string | body | The request body for POST/PUT, "" for GET. |
Example
key req;
default
{
touch_start(integer n)
{
req = llHTTPRequest("https://example.com/api/time", [HTTP_METHOD, "GET"], "");
}
http_response(key id, integer status, list meta, string body)
{
if (id != req) return;
if (status == 200) llSay(0, "Server said: " + body);
else llSay(0, "HTTP " + (string)status);
}
}
Energy
10
The Linden Scripting Library — what every SL-compatible grid provides.
More in LSL
float llGetMinScaleFactor()
float llAtan2(float y, float x)
integer llGetUsedMemory()
integer llGiveMoney(key destination, integer amount)
void llMakeSmoke(integer particles, float scale, float vel, float lifetime, float arc, string texture, vector offset)
void llTakeCamera(string avatar)
string llIntegerToBase64(integer number)
list llGetPrimMediaParams(integer face, list rules)