I am trying to send a "PATCH" request using Helidon WebClient. How can this be achieved? Is it possible?
I've made requests using other protocols with no problem since there are functions for GET, POST, PUT, and DELETE requests, but I can't find one for PATCH.
WebClient wc = ...;
// GET request
wc.get().request(MyClass.class);
// POST request
wc.post().submit(somePayload, MyClass.class);
// PATCH request
// ???
There is no .patch() convenience method for this. If you look beneath the surface of these convenience methods, you will find that they internally delegate to WebClientRequestBuilder method(Http.RequestMethod method);.
Following the same pattern, the PATCH request would be:
WebClient wc = ...;
// PATCH request
wc.method(Http.Method.PATCH)
.submit(somePayload, MyClass.class)