Daily Archives: October 17, 2016

  1. Home
  2. /
  3. Archive for October 17th, 2016

Asynchronous HTTP API – Beta Launch

Posted in : Developer News, New Features on by : Tim

SmartThings Developers – we’re excited to announce a beta version of APIs that allow developers to make HTTP requests to third party services asynchronously. These APIs work similarly to existing APIs like httpGet(), httpPut(), etc., but with one big difference – they are executed asynchronously. Here’s an example of making an asynchronous GET request: include ‘asynchttp_v1’ def initialize() { def params = [ uri: “https://api.github.com”, path: “/search/code”, query: [q:‘httpGet+repo:SmartThingsCommunity/SmartThingsPublic’] ] // make request, passing the name of the method to call // with the response asynchttp_v1.get(“responseHandler”, params) } // response handler is called when the request completes // (in another…