Performing a multipart mixed (batch) request
Learn about request URIs
When you make multiple (batch) API request, you use a special URI which is always:
POST /multipart/mixed
The request in this case will be split into further requests, that are forwarded to the appropriate API endpoints.
Sending a multipart upload request
Example: Sending a multipart upload request
POST /multipart/mixed HTTP/1.1
Host: api.shardimage.com
Content-ID: <MAIN CONTENT ID>
Content-Length: <NUMBER_OF_BYTES_IN_ENTIRE_REQUEST_BODY>
Content-Transfer-Encoding: binary
Content-Type: multipart/mixed; boundary=<BOUNDARY>
Expect: 100-continue
X-Shardimage-Auth: <AUTH>
--<BOUNDARY>
Content-Type: application/http
Content-Transfer-Encoding: binary
GET /image/v1/c/<CLOUD ID>/<PUBLIC ID> HTTP/1.1
Host: api.shardimage.com
Content-ID:<MAIN CONTENT ID>
Content-Length:<JSON DATA LENGTH>
Content-Type:application/json; charset=utf-8
Expect:100-continue
X-Shardimage-Auth: <AUTH>
--<BOUNDARY>
Content-Type: application/http
Content-Transfer-Encoding: binary
GET /image/v1/c/<CLOUD ID>/<ANOTHER PUBLIC ID> HTTP/1.1
Host: api.shardimage.com
Content-ID:<MAIN CONTENT ID>
Content-Length:<JSON DATA LENGTH>
Content-Type:application/json; charset=utf-8
Expect:100-continue
X-Shardimage-Auth: <AUTH>
--<BOUNDARY>--