Closed kgroat closed 6 years ago
Cool! When I last tested this in apig itself, it didn't work. Has that been fixed (or did I test wrong)?
According to API Gateway, they look at not just the outgoing Content-Type
header, but also the incoming Accepts
header, which means that a type of image/*
would trigger binary processing if the browser sends it in the Accepts
header.
This would then just ensure that if the outgoing Content-Type
matches the same wildcard, it would get processed correctly
sorry for taking so long to get back to this.
ok, so, you changes are fair in that they work locally, but I'm still uncertain about API gateway behavior. we could at least document it better but I'm gonna merge this then do some more testing / docs.
Added an integration test and released at 1.6.0
ok, so, you changes are fair in that they work locally, but I'm still uncertain about API gateway behavior. we could at least document it better but I'm gonna merge this then do some more testing / docs.
@dougmoscrop Please see detailed API Gateway behavior here: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-payload-encodings-workflow.html
This adds support for wildcard
content-type
to be used in the array or environment variable used to determine if a response should be binary encoded.