Update README.md
This commit is contained in:
15
README.md
15
README.md
@@ -15,7 +15,20 @@ link_message(integer sender, integer num, string str, key id)
|
||||
{
|
||||
if (llJsonGetValue(str, ["method"]) == "prim-dns:request")
|
||||
{
|
||||
jsonrpc_link_notification(sender, "prim-dns:response", ["request-id", request_id, "status", 200, "body", "Hello, world!"]);
|
||||
key request_id = (key) llJsonGetValue(str, ["params", "request-id"]);
|
||||
|
||||
string params = llList2Json(JSON_OBJECT, [
|
||||
"request-id", request_id,
|
||||
"status", 200,
|
||||
"body", "Hello, world!"
|
||||
]);
|
||||
|
||||
string message = llList2Json(JSON_OBJECT, [
|
||||
"method", "prim-dns:response",
|
||||
"params", params
|
||||
]);
|
||||
|
||||
llMessageLinked(sender, 0, message, NULL_KEY);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user