Google Cloud Storage JSON API:批量删除返回未知错误(500内部服务器错误)

弗拉基米尔(Fladimir Obrizan)

我正在尝试使用文档批量删除几个对象:发送批量请求这是我的请求(<my_api_key>是有效的API密钥以及其他方法,例如存储桶的列表内容是否正常,<my_bucket>是确切存储桶名称的占位符):

POST /batch?key=<my_api_key>
host: www.googleapis.com
content-type:multipart/mixed; boundary="===============7330845974216740156=="

--===============7330845974216740156==
Content-Type: application/http 
Content-Transfer-Encoding:binary

DELETE /storage/v1/b/<my_bucket>/o/James-Hetfield-happy.jpg
--===============7330845974216740156==

这是响应:

access-control-allow-credentials:true
access-control-allow-origin:chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm
access-control-expose-headers:Cache-Control,Content-Encoding,Content-Length,Content-Type,Date,Expires,Pragma,Server,Vary
alternate-protocol:443:quic,p=0.02
cache-control:no-cache, no-store, max-age=0, must-revalidate
content-encoding:gzip
content-length:33
content-type:text/html; charset=UTF-8
date:Tue, 10 Feb 2015 16:55:14 GMT
expires:Fri, 01 Jan 1990 00:00:00 GMT
pragma:no-cache
server:GSE
status:500 Internal Server Error
vary:Origin
vary:X-Origin
version:HTTP/1.1
x-content-type-options:nosniff
x-frame-options:SAMEORIGIN
x-xss-protection:1; mode=block

Unknown Error

当我发送以下正文时:

--===============7330845974216740156==
DELETE /storage/v1/b/<my_bucket>/o/James-Hetfield-happy.jpg
--===============7330845974216740156==

我的身体得到200 OK响应,--batch_rTJhZwR1jHM_AAh2WtGp7ik--但文件仍然存在。

请提供使用Google Cloud Storage JSON API发送批量删除请求的正确格式。

弗拉基米尔(Fladimir Obrizan)

我的错。从示例复制粘贴时,在标头后立即出现一个备用空格字符Content-Type: application/http当我删除请求标头中的所有备用字符时,批量删除工作良好。

结论:复制粘贴后手动验证请求的语法。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Google Cloud Storage JSON上载器API显示错误

来自分类Dev

在本地主机上使用Google Cloud Storage JSON API

来自分类Dev

Google Cloud Storage返回错误的身份

来自分类Dev

使用JSON API将文件上传到Google Cloud Storage,错误401未经授权

来自分类Dev

Google Cloud Storage Nearline出现错误bn

来自分类Dev

Google Cloud Storage 运行时错误

来自分类Dev

Google Cloud Storage API 写入限制

来自分类Dev

通过Google Cloud Storage JSON API插入对象时公开共享

来自分类Dev

Google Cloud Storage JSON REST API-获取保存在子目录中的对象

来自分类Dev

使用带有Java的JSON API在Google Cloud Storage中插入对象(作为文件夹)

来自分类Dev

在Airflow任务中从Google Cloud Storage mongoimport JSON

来自分类Dev

是否使用Java API在Google Cloud Storage中批量插入?

来自分类Dev

从Google Cloud Storage提供Google客户服务帐户的keyFilename

来自分类Dev

Google Cloud Storage与Google Cloud CDN

来自分类Dev

如何使用Google API从Google Cloud Storage获取报告

来自分类Dev

Google Cloud Storage Transfer Service失败,出现UNKNOWN错误

来自分类Dev

Google Cloud Storage上的网站配置,无错误页面

来自分类Dev

HttpURLConnection PUT到Google Cloud Storage并显示错误403

来自分类Dev

使用generateSignedPostPolicyV4的@ google-cloud / storage错误

来自分类Dev

Google Cloud Storage上的网站配置,无错误页面

来自分类Dev

Google Cloud Storage Force下载

来自分类Dev

上载Google Cloud Storage iOS

来自分类Dev

Android的Google Cloud Storage管理

来自分类Dev

Configure Django and Google Cloud Storage?

来自分类Dev

IP限制Google Cloud Storage

来自分类Dev

Google Cloud Storage - 权限不足

来自分类Dev

带有错误的Google Cloud Storage“上传无法完成”:错误:“ storage.objects.create”

来自分类Dev

从Google Cloud Storage中提取JSON,转换为pandas DF,然后写入Google BigQuery

来自分类Dev

递归删除Google Cloud Storage中的文件夹

Related 相关文章

  1. 1

    Google Cloud Storage JSON上载器API显示错误

  2. 2

    在本地主机上使用Google Cloud Storage JSON API

  3. 3

    Google Cloud Storage返回错误的身份

  4. 4

    使用JSON API将文件上传到Google Cloud Storage,错误401未经授权

  5. 5

    Google Cloud Storage Nearline出现错误bn

  6. 6

    Google Cloud Storage 运行时错误

  7. 7

    Google Cloud Storage API 写入限制

  8. 8

    通过Google Cloud Storage JSON API插入对象时公开共享

  9. 9

    Google Cloud Storage JSON REST API-获取保存在子目录中的对象

  10. 10

    使用带有Java的JSON API在Google Cloud Storage中插入对象(作为文件夹)

  11. 11

    在Airflow任务中从Google Cloud Storage mongoimport JSON

  12. 12

    是否使用Java API在Google Cloud Storage中批量插入?

  13. 13

    从Google Cloud Storage提供Google客户服务帐户的keyFilename

  14. 14

    Google Cloud Storage与Google Cloud CDN

  15. 15

    如何使用Google API从Google Cloud Storage获取报告

  16. 16

    Google Cloud Storage Transfer Service失败,出现UNKNOWN错误

  17. 17

    Google Cloud Storage上的网站配置,无错误页面

  18. 18

    HttpURLConnection PUT到Google Cloud Storage并显示错误403

  19. 19

    使用generateSignedPostPolicyV4的@ google-cloud / storage错误

  20. 20

    Google Cloud Storage上的网站配置,无错误页面

  21. 21

    Google Cloud Storage Force下载

  22. 22

    上载Google Cloud Storage iOS

  23. 23

    Android的Google Cloud Storage管理

  24. 24

    Configure Django and Google Cloud Storage?

  25. 25

    IP限制Google Cloud Storage

  26. 26

    Google Cloud Storage - 权限不足

  27. 27

    带有错误的Google Cloud Storage“上传无法完成”:错误:“ storage.objects.create”

  28. 28

    从Google Cloud Storage中提取JSON,转换为pandas DF,然后写入Google BigQuery

  29. 29

    递归删除Google Cloud Storage中的文件夹

热门标签

归档