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"; } }
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"; } }
转载于:https://www.cnblogs.com/lesliefang/p/3595968.html