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"; } }
2022-02-07 05:31:25
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"; } }