# httpGet

**URL:** <https://community.smartthings.com/t/httpget/416>\
**Category:** General Discussion\
**Tags:** archive\_developers\
**Created:** [June 25, 2013, 9:27am UTC](https://community.smartthings.com/t/httpget/416 "2013-06-25T09:27:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gary](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gary](https://community.smartthings.com/u/gary)\
**Post date:** [June 25, 2013, 9:27am UTC](https://community.smartthings.com/t/httpget/416/1 "2013-06-25T09:27:43Z")

</div>

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](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!

---

<div class="post-metadata">

**Author:** ![Dianoga](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/dianoga/32/337_2.png) [@Dianoga](https://community.smartthings.com/u/Dianoga)\
**Post date:** [June 25, 2013, 9:40am UTC](https://community.smartthings.com/t/httpget/416/2 "2013-06-25T09:40:15Z")

</div>

I fought with this very thing yesterday.

`response.data` should give you a string with the body of the response.

If your response is json (and has a valid content type application/json) you can use `response.data.item` to get json bits. Example: `response.data.temperature` gives me the temperature from my response.

That may work with XML as well, but I haven’t tried it.

As far as an easy way to debug, I haven’t found one yet.

---

<div class="post-metadata">

**Author:** ![gary](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gary](https://community.smartthings.com/u/gary)\
**Post date:** [June 25, 2013, 11:31am UTC](https://community.smartthings.com/t/httpget/416/3 "2013-06-25T11:31:37Z")

</div>

Perfect–THANKS, works great!
