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:

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