对象存储服务 OBS-POST上传:请求示例:指定状态码

时间:2024-10-21 15:06:42

请求示例:指定状态码

指定成功响应的状态码为200

POST /srcbucket HTTP/1.1
User-Agent: PostmanRuntime/7.26.8
Accept: */*
Postman-Token: 667dcc44-1c48-41ba-9e41-9f87d8975089
Host: obs.cn-north-4.myhuaweicloud.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: multipart/form-data; boundary=--------------------------285613759795901770404350
Content-Length: 1134
 
----------------------------285613759795901770404350
Content-Disposition: form-data; name="key"
 
obj
----------------------------285613759795901770404350
Content-Disposition: form-data; name="ObsAccessKeyId"
 
XXXXXXXXXXXXXXX000003
----------------------------285613759795901770404350
Content-Disposition: form-data; name="signature"
 
9rc4bVhDPQ7eHtw17hWtYxLnBWU=
----------------------------285613759795901770404350
Content-Disposition: form-data; name="policy"
 
eyJleHBpcmF0aW9uIjoiMjAyMy0wNi0xNVQxNDoxMTozNFoiLCAiY29uZGl0aW9ucyI6W3siYnVja2V0Ijoic3JjYnVja2V0MiJ9LHsic3VjY2Vzc19hY3Rpb25fc3RhdHVzIjoiMjAwIn0seyJjb250ZW50LXR5cGUiOiJ0ZXh0L3BsYWluIn0seyJrZXkiOiIzMzMifSxdfQ==
----------------------------285613759795901770404350
Content-Disposition: form-data; name="success_action_status"
 
200
----------------------------285613759795901770404350
Content-Disposition: form-data; name="file"; filename="test.txt"
Content-Type: text/plain
 
 
----------------------------285613759795901770404350
Content-Disposition: form-data; name="submit"
 
Upload to OBS
----------------------------285613759795901770404350--
support.huaweicloud.com/api-obs/obs_04_0081.html