I have a client application that send compressed data to aws api gateway. The data is defalte compressed. The request headers are as below:
Content-Encoding: deflate
Content-Type: application/json
But i am getting response from aws api :
Response code : 415, Response message : Unsupported Media Type and Response body
As per aws documentation AWS API Gateway supports deflate,gzip,identity content encoding. And i am receiving the response from api getway as per this documentation. https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-make-request-with-compressed-payload.html
Below are the settings i made on aws api gateway to accept compressed payload. Please rectify if i am missing any setting or proper combination of settings for this.
1. Request Body on Method Request contains: application/json , application/x-gzip, application/x-gzip-compressed, application/zlib content types.
2. Content Encoding is disabled in settings page. This is to compress the response messgae from api agetway. But in my case i want to send compress message to api gateway. Please rectify if it has something to do with payload compression.
3. Binary Media Types in settings page: I have tried adding application/json, application/zlib and few other content types here. Also tried with wildcard content type as */*.
4. Tested by checking "Use Lambda Proxy integration" in Integration Request. Also tested by unchecking it and using mapping template with option "request body pass through : When there are no templates defined".
Any help is going to be appreciated. :)