Azure 存储服务 REST API:创建容器

调用 Create Container 时出现以下错误。


响应代码:411 响应消息:需要长度


String stringToSign = "PUT\n\n\n\n0\n\n\n\n\n\n\n\nx-ms-date:" + date + "\nx-ms-version:" + "2014-02-14\n" + "/" + storageAccount + "/"+ "container-create-test"+"\nrestype:container"+"\ntimeout:60";

Java 代码片段。


HttpURLConnection connection = (HttpURLConnection)new URL(url).openConnection();

connection.setRequestMethod(vMethod);

connection.addRequestProperty("Authorization", authHeader);

connection.addRequestProperty("x-ms-date", date);

connection.addRequestProperty("x-ms-version", "2014-02-14");

connection.addRequestProperty("Content-Length", "0");


茅侃侃
浏览 143回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java