Running OH3.0.1, I’m trying (desperately) to get an access token in order to poll my heat pump for its information. On the command line I can do it using curl (thank to the help of fellow users!). But I’m now trying to do it in a rule. I thought that using sendHttpPostRequest would be very straigt forward, but apparently not!
var token = sendHttpPostRequest("https://api.myuplink.com/oauth/token", "application/json", content, headers, 1000)
Type mismatch: cannot convert from String to Map<String, String>; line 6, column 571, length 7
(content and heards are defined in their respective variables, obviously).
What’s the proper way to define the headers? I can’t wrap my head around it, I obviously don’t want a Map, I just want to post the required headers (-u “id:secret”)