简体   繁体   English

如何在Android中集成PATCH Rest API?

[英]How to integrate PATCH rest api in android?

I am integrating rest api in android.There are four kind of services. 我正在将rest api集成到android中。有四种服务。 1.POST 2.GET 3.PATCH 4.DELETE. 1.POST 2.GET 3.PATCH 4.DELETE。 I have integrated all using "asynchttpclient" except PATCH webservice. 我已经使用PATCH Webservice集成了所有使用“ asynchttpclient”的文件。 I have checked out all the method but haven't find any method relevant to PATCH in "asynchttpclient". 我已经签出了所有方法,但是在“ asynchttpclient”中找不到与PATCH相关的任何方法。 Can anybody tell me how can I integrate rest api using PATCH method with same library "asynchttpclient" or anything else. 谁能告诉我如何使用带有相同库“ asynchttpclient”或其他任何内容的PATCH方法集成rest api。 I have stuck here and spent 2 day over it but haven't found any solution for that. 我已经在这里停留了2天,但是还没有找到任何解决方案。

Android comes with a copy of apache http client 4.x, You can subclass HttPPost to make an HttpPatch object, or use the _HttpMethod option on the query string, similar to how its outlined in this other post. Android随附了一个Apache http客户端4.x副本,您可以将HttpPatch子类HttPPost HttpPatch对象,或者在查询字符串上使用_HttpMethod选项,类似于在_HttpMethod文章中概述的方式。 PATCH example with apache HttpClient Apache HttpClient的PATCH示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM