Azure Table "DELETE" 回归 "inputs is not valid"

Azure Table "DELETE" returning "inputs is not valid"

我不知道我做错了什么。根据文档 (https://docs.microsoft.com/en-us/rest/api/storageservices/delete-entity1),我的 DELETE 请求应该有效吗?

A GET 请求完美运行,即:

curl -X GET "https://foo.table.core.windows.net/bar(PartitionKey='alice',RowKey='bob')?sv=2017-04-17&ss=qt&srt=o&sp=rwdlacup&se=2021-08-22T23:33:21Z&st=2017-08-01T15:33:21Z&sip=10.10.10.0-10.10.10.255&spr=https&sig=SECRET_SQUIRREL"

Returns 数据。没问题。所有内容都显示正确。

如果我然后将 -X GET 更改为 -X DELETE 并保持其他所有内容相同,即:

curl -X DELETE "https://foo.table.core.windows.net/bar(PartitionKey='alice',RowKey='bob')?sv=2017-04-17&ss=qt&srt=o&sp=rwdlacup&se=2021-08-22T23:33:21Z&st=2017-08-01T15:33:21Z&sip=10.10.10.0-10.10.10.255&spr=https&sig=SECRET_SQUIRREL"

服务returns:

<?xml version="1.0" encoding="utf-8"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>InvalidInput</code><message xml:lang="en-US">One of the request inputs is not valid.
RequestId:5d3bce31-0002-0054-4b18-1cba44000000
Time:2017-08-23T14:02:00.3177321Z</message></error>

根据 Delete Entity 的文档,您缺少 If-Match 请求 header。来自文档 link:

请在您的请求中包含 If-Match header 并将值为 * 并且请求应该有效。