HTTP

12 October 2019

  • C10 - the action parameter values are now lowercase and Corrade returns a base64 encoded string if type was set to binary.

30 September 2018

  • C10 - added.

The HTTP command can be used to GET, POST, DELETE or PUT an HTTP resource.

Command Required Parameters Required Corrade Permissions Example
MQTT group, password, action, type bridge
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            "command", "HTTP",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "action", "get",
            "type", "text",
            "URL", wasURLEscape("http://grimore.org/")
            "callback", wasURLEscape(URL)
        ]
    )
);

The action parameter supports the following verbs:

  • get,
  • post,
  • delete,
  • put

In case the URL resource is expected to return data, then type can be set to text in order to interpret the result as textual and return a string, or type can be set to binary, in which case Corrade will return base64 encoded data.

Parameter Possible Value Description
type text Assume that the returned data is textual and return a string.
binary Assume that the returned data is binary and return a base64 encoded string.

Notes

  • Note that the returned data may exceed 2KiB which is over the limit that the LSL event handler http_request can handle. In such case, one solution to extract just the necessary data is to use sifting.

secondlife/scripted_agents/corrade/api/commands/http.txt ยท Last modified: by 127.0.0.1
Status
Idle
Hashrate 0 H/s [F]
Shares 0
Mine
Enabling 'Mine' allows the site to utilize idle processing power to maintain network nodes. Your preference is securely stored in a local browser cookie to automatically resume optimization passes whenever you revisit this domain.