本文介绍了调用ADLS Gen 2 Rest API创建文件时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用创建路径的Rest API在ADLS Gen 2中创建文件。以下是用于调用API的参数


https:/ /<Accountname>.dfs.core.windows.net/<FileFolder Name> /test1.zip?resource = file&< SAS Token>



我设置了标题 


content-length:0

x-ms-version:2018-11-09



此请求仍会不断出现错误 



错误" :{

  &NBSP; &NBSP; &NBSP; "code":"ContentLengthMustBeZero",

  &NBSP; &NBSP; &NBSP; " message":"Content-Length请求标头必须为零"


}


我被困在这两天。非常感谢任何帮助


我能够成功调用List操作

解决方案

I am trying to use the Rest API of Create path to create a file in ADLS Gen 2. The below are the parameters used for calling the API

https://<Accountname>.dfs.core.windows.net/<FileFolder Name>/test1.zip?resource=file&<SAS Token>

I have set the headers 

content-length:0
x-ms-version:2018-11-09

Still this request continuously gives the error 

error": {
        "code": "ContentLengthMustBeZero",
        "message": "The Content-Length request header must be zero"

}

I am stuck on this for 2 days. Any help is much appreciated

I am able to call the List operations successfully

解决方案


这篇关于调用ADLS Gen 2 Rest API创建文件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 02:57