I’m trying to get rid of HTTP Binding by implementing a DSL Rule which periodically sends a GET-Request.
Since the request needs some headers to get the data in json I’m trying to use sendHttpGetRequest(String url, Map<String, String> headers, int timeout) as described in https://www.openhab.org/docs/configuration/actions.html#http-actions.
Unfortunately this gives me the following error:
2020-03-06 09:47:00.536 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Error during the execution of startup rule 'Get next recordings': Could not invoke method: org.eclipse.smarthome.model.script.actions.HTTP.sendHttpGetRequest(java.lang.String,int) on instance: null
I checked a bit into source code and I can’t find a method that includes headers in https://github.com/eclipse/smarthome/blob/master/bundles/model/org.eclipse.smarthome.model.script/src/org/eclipse/smarthome/model/script/actions/HTTP.java
Before digging deeper I’d like to ask if somebody is using HTTP action in this way or if there might be an error in the documentation?