HTTP Patch Method in Binding

Has anybody used a HTTP Patch request in a binding?

The API I’m working with uses a PATCH method to submit updates rather than a POST which I’d have expected. To implement this I’m trying to import the Apache client class.

In my manifest I add the following:


And my method looks like this:

CloseableHttpClient http = HttpClientBuilder.create().build();
String payload = "{\"RequestOverride\":{\"Type\":\"Manual\",\"SetPoint\":165}}";
HttpPatch updateRequest = new HttpPatch("");
updateRequest.setEntity(new StringEntity(payload, ContentType.APPLICATION_JSON));
HttpResponse response = http.execute(updateRequest);

It compiles fine, but at run time I see this in the console:

!ENTRY org.eclipse.osgi 4 0 2017-11-10 22:52:38.172
!MESSAGE Bundle initial@reference:file:../../../../../git/openhab2-addons/addons/binding/org.openhab.binding.draytonwiser/ was not resolved.

!ENTRY org.eclipse.osgi 4 0 2017-11-10 22:52:38.184
!MESSAGE Bundle initial@reference:file:plugins/org.apache.httpcomponents.httpclient_4.5.2.v20170210-0925.jar was not resolved.

Do I need to add a .jar somewhere? Is there a better way to implement a patch method?

Thanks in advance!

In my Debug configurations I had two versions of the module selected. Deselecting the older versions made the errors disappear.