android httpclient 发送 PATCH 请求

 Put 用于全部更新

 Patch 用于部分更新

 重写一下 HttpPut 或 HttpPost 的 getMethod 方法

/**
 * Send a patch request
 */
public class HttpPatch extends HttpPut {

    public HttpPatch(String url) {
        super(url);
    }

    @Override
    public String getMethod() {
        return "PATCH";
    }
}

 

  

posted @ 2014-03-12 11:34  LeslieFang  阅读(2271)  评论(0编辑  收藏  举报