Having a Problem With httpGet

Having an issue with an httpGet request to ST. Here is the code I am using, ID and Token deleted obviously. I keep getting the error shown below. What am I doing wrong??? I can issue the command in Postman and it works fine so I know the URL is correct.

    def reqString ="https://graph-na02-useast1.api.smartthings.com/api/smartapps/installations/ID/command/Unlock/?access_token=TOKEN"
    def params = [ uri: reqString ]

    httpGet(params)

app:17612019-10-29 09:03:19.711 am errorgroovy.lang.MissingMethodException: No signature of method: user_app_jwwhite001_ST_Lock_Control_801.httpGet() is applicable for argument types: (java.util.LinkedHashMap) values: [[uri:https://graph-na02-useast1.api.smartthings.com/api/smartapps/installations/ID/command/Unlock/?access_token=token] on line 60 (lockDetectHandler)

I think you may need the closure argument added to the httpGet() call. See api details below.

https://docs.hubitat.com/index.php?title=Common_Methods_Object#httpGet

2 Likes

Yeah, just figured that out. Didn't think I needed that if I wasn't interested in the response, but guess so.

Thanks