[OH3] HowTo perform sendHttpGetRequest and sendHttpPutRequest in order to read/write through REST API

found and tested the solution :slight_smile:

val headers = newHashMap("Authorization" -> "Bearer <put_your_token_here>", "WWW-Authenticate"-> "Basic")
sendHttpPutRequest("http://127.0.0.1:8080/rest/things/openuv:uvreport:local/enable", "application/json", 'false', headers, 1000)

thanks @Wolfgang_S for the input :slight_smile:

Andrea

5 Likes