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.
http (Commands)
TypeCorrade progressive command
CommandHTTP
Parametersgroup, password, action
DescriptionThe HTTP command can be used to GET, POST, DELETE or PUT an HTTP resource.
Permissionsbridge
Last ChangesC10 - 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: 2020/09/04 06:44 (external edit)

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy, copyright and the plagiarism pages.