Open apple-corps opened 6 years ago
If I set responseContentEncoding("gzip") and make a request, the response has the expected contentEncoding: gzip against a real S3 api.
gzip
However doing the same against s3mock , the response has null contentEncoding.
s3mock
null
using V2 of client API E.G. software.amazon.awssdk
V2
software.amazon.awssdk
def getGzipByteArray(client: S3Client, bucket: String, key: String): Array[Byte] = { val response = client.getObjectBytes(getGzipObjectRequest(bucket,key)) println (response.response().contentEncoding()) response.asByteArray() } def getGzipObjectRequest(bucket: String ,key : String ) = { GetObjectRequest.builder() .responseContentEncoding("gzip") .responseContentType("application/octet-stream") .bucket(bucket) .key(key) .build() }
If I set responseContentEncoding("gzip") and make a request, the response has the expected contentEncoding:
gzip
against a real S3 api.However doing the same against
s3mock
, the response hasnull
contentEncoding.using
V2
of client API E.G.software.amazon.awssdk