Skip to content

Commit 41e07cc

Browse files
committed
Serialized body.
1 parent 96ed866 commit 41e07cc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

smartapps/fireboy1919/milight-manager.src/milight-manager.groovy

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import groovy.json.JsonOutput
2+
13
definition(
24
name: "MiLight Manager",
35
singleInstance: true,
@@ -52,7 +54,7 @@ def httpCall(body, uri, mac, evt) {
5254
def params = [
5355
uri: uri,
5456
path: path,
55-
body: body,
57+
body: JsonOutput.toJson(body),
5658
contentType: 'application/json'
5759
]
5860
log.debug("Sending to ${params['uri']}${path}.")
@@ -62,6 +64,6 @@ def httpCall(body, uri, mac, evt) {
6264
//parseResponse(resp, mac, evt)
6365
}
6466
} catch (e) {
65-
log.error "error: $e"
67+
log.error "Error sending: $e"
6668
}
6769
}

0 commit comments

Comments
 (0)