Example 3: Retrieving part of an object

Here’s a sample GET request that retrieves the first hundred thousand bytes of the object named quarterly_rpts/Q4_2019.ppt in the finance bucket. The request writes the object data to a file named Q4_2019_Rpt_Part-1. The request is being made while versioning is disabled for the bucket.

Request with s3curl command line

./s3curl.pl --id=lgreen -- -k
     "https://finance.europe.hcp.example.com/quarterly_rpts/Q4_2019.ppt"
     -H "Range: bytes=0-99999" > Q4_2019_Rpt_Part-1

Request headers

GET /quarterly_rpts/Q4_2019.ppt HTTP/1.1
Host: finance.europe.hcp.example.com
Date: Fri, 07 February 2020 17:19:26 +0000
Authorization: AWS bGdyZWVu:f6RKgLahMlrfc7de89aJ0Xt8wKM=
Range: bytes=0-99999

Response headers

HTTP/1.1 206 Partial Content
Date: Fri, 07 February 2020 17:19:26 GMT
ETag: "617e8ef649d40cda1f7f3ca81c97a06a"
Accept-Ranges: bytes
Last-Modified: Fri, 20 Jan 2017 17:19:26 GMT
Content-Type: application/vnd.ms-powerpoint
Content-Range: bytes 0-99999/235813
Content-Length: 100000

© 2015, 2020 Hitachi Vantara LLC. All rights reserved.