12 October 2019
action parameter values are now lowercase and Corrade returns a base64 encoded string if type was set to binary.30 September 2018
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. |
http_request can handle. In such case, one solution to extract just the necessary data is to use sifting.