Dropwizard Jersey Client 2.21 Http PATCH
Small trick when using HTTP PATCH on Jersey HTTP client … You may have to flick the switch HttpUrlConnectorProvider.SET_METHOD_WORKAROUND to true
I found solution here
Beware the documentation statement:
“NOTE: Enabling this property may cause security related warnings/errors and it may break when other JDK implementation is used. Use only when you know what you are doing”
return client
.target("http://localhost:8080/patchable/1")
.request(MediaType.APPLICATION_JSON)
.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true)
.method("PATCH", Entity.json(json));