问题
Is it possible to execute PATCH method with jetty client? I am using Jetty 9.3.3 and the PATCH method is not defined in the enum HttpMethod.
I also checked the api of Jetty 9.3.10 and I did not find the PATCH method in the enum HttpMethod.
if it is not supported, how can I extend the Jetty code to be able to use it? I only needed it in the client side (Jetty client need to be able to send Patch request).
Thanks and best regards.
回答1:
Yes, it's possible to use the PATCH
verb with the Jetty client.
The value in the HttpMethod
enum is absent, but the recommendation is to pass PATCH
as a string to the method() API in the Request.
Support was added in this commit.
来源:https://stackoverflow.com/questions/38096140/jetty-client-and-patch-method