Azure Blob Starage - Rest API - 400 请求输入之一无效

问题描述 投票:0回答:1

我正在尝试使用批处理请求从 Azure Blob 存储中删除 blob。 目前,我正在使用邮递员来验证我的请求,然后再在我的应用程序中使用它。 我无法获得不同的输出或错误。对于授权,我使用 SAS。

这是我的要求:
网址:

https://APPLICATIONNAME.blob.core.windows.net/MYCONTAINER?restype=container&comp=batch&sig=SIGNATURE&sp=racwdl&sip=92.60.9.18&sv=2020-08-04&st=2022-04-27T08:52:29Z&spr=https&se=2022-05-30T16:52:29Z&sr=c

标题:

Content-Type: multipart/mixed; boundary=batch_357de4f7-6d0b-4e02-8cd2-6361411a9525
x-ms-version: 2020-08-04

身体:

--batch_357de4f7-6d0b-4e02-8cd2-6361411a9525
Content-Type: application/http
Content-Transfer-Encoding: binary
Content-ID: 0

DELETE /MYCONTAINER/NAVIGATIONS.sql?sp=racwdl&sig=SIGNATURE&sip=92.60.9.18&sv=2020-08-04&st=2022-04-27T08:52:29Z&spr=https&se=2022-05-30T16:52:29Z&sr=c HTTP/1.1
Content-Length: 0

--batch_357de4f7-6d0b-4e02-8cd2-6361411a9525--

回复:

--batchresponse_cdb19852-af76-4719-b9d2-8d61b5d3e6da
Content-Type: application/http

HTTP/1.1 400 One of the request inputs is not valid.
x-ms-error-code: InvalidInput
x-ms-request-id: 4dd49405-d01e-0035-12c4-601f12000000
x-ms-version: 2020-08-04
Content-Length: 221
Content-Type: application/xml
Server: Windows-Azure-Blob/1.0

<?xml version="1.0" encoding="utf-8"?>
<Error><Code>InvalidInput</Code><Message>One of the request inputs is not valid.
RequestId:4dd49405-d01e-0035-12c4-601f12000000
Time:2022-05-05T21:07:45.5349988Z</Message></Error>
--batchresponse_cdb19852-af76-4719-b9d2-8d61b5d3e6da--

我希望有人能给我提示或解决方案。

azure azure-blob-storage odata
1个回答
0
投票

对于可能遇到问题并找到此页面的任何人(就像我一样),正文必须在 --batch_guid-- 行之后包含最后一个空行。

© www.soinside.com 2019 - 2024. All rights reserved.