12 October 2019

30 September 2018

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

CommandRequired ParametersRequired Corrade PermissionsExample
MQTTgroup, password, action, typebridge
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:

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.

ParameterPossible ValueDescription
typetextAssume that the returned data is textual and return a string.
binaryAssume that the returned data is binary and return a base64 encoded string.

Notes