问题描述
skydrive文件移动的文档说明是MOVE https://apis.live.net/v5.0/file.a6b2a7e8f2515e5e.A6B2A7E8F2515E5E!126 Authorization: Bearer ACCESS_TOKENContent-Type: application/json { "destination": "folder.a6b2a7e8f2515e5e.A6B2A7E8F2515E5E!114"}请问如何发送move/copy请求
解决方案
move, copy也是http的标准method,只是好像支持的人不多。如果是java,用httpclient的话,只能自己写这2个。类似下面@NotThreadSafe public class HttpMove extends HttpRequestBase { public final static String METHOD_NAME = "MOVE"; public HttpMove() { super(); } public HttpMove(final URI uri) { super(); setURI(uri); } /** * @throws IllegalArgumentException if the uri is invalid. */ public HttpMove(final String uri) { super(); setURI(URI.create(uri)); } @Override public String getMethod() { return METHOD_NAME; } }