Has anyone successfully retrieved data out of a web call? I have the below code along with results.
def successWebcall = { response ->
log.debug “Response was successful, $response”
}
def params = [
uri: “http://home.automation.server/IsAnyoneInTheHouse.php”,
success: successWebcall
];
httpGet(params);
}
The above code returns: Response was successful, groovyx.net.http.HttpResponseDecorator@2162e9b7
I’ve looked up groovyx.net.http.HttpResponseDecorator and found there are many methods out there but I haven’t figured out how to access that data within SmartThings. 1) Has anyone been able to retrieve data from a website, and 2) is there an easy way for me/anyone to determine what is inside an object via a debug statement (or something).
Thanks in advance!