Jetty client and PATCH method

感情迁移 提交于 2019-12-25 01:17:00

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!