Thanks. Getting lots of help, and I appreciate it... I just wish I understood what was going wrong better. Using your enterTokenExample as a test, I get an error in the def params, for the headers:
illegal colon after argument expression; solution: a complex label expression before a colon must be parenthesized @ line 321, column 29
Tried changing it to:
headers: "[ token-auth: ${ token }]",
This does not get a compile error, but results in an error in the log:
java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.util.Map on line 326
Line 326 corresponds to:
httpPostJson(params) {resp ->
As a related example, here is my latest Params line (this one gets a 408 - Request Timeout response):
Params = [ uri: "https://rest-${ state.Tier }.immedia-semi.com/api/v4/account/${ state.AccountID }/client/${ state.Client }/pin/verify", contentType: "application/json", headers: "[token-auth: ${ state.AuthToken }]", body: "{\"pin\":\"${ PIN }\"}" ]