serverless-apigateway-service-proxy
serverless-apigateway-service-proxy copied to clipboard
SQS not able to specify headers in responseParameters
No matter what I do, my response shows up as application/json. I am able to change the method response model to application/xml in API Gateway manually and it works so I am assuming I would need to change something in my response parameters... Is there something I am doing wrong? When I try deploying I get this:
errors : [Invalid mapping expression specified: true, Invalid mapping expression specified: integration.response.header.Content-Type]
- statusCode: 200
selectionPattern: '2\d{2}'
responseParameters:
{ integration.response.header.Content-Type: true }
responseTemplates:
application/xml: |-
#set($inputRoot = $input.path('$'))
So I was able to specify the content type by overriding the headers with a mapping template:
selectionPattern: '2\d{2}'
responseTemplates:
application/xml: |-
#set($inputRoot = $input.path('$'))
#set($context.responseOverride.header.Content-Type = 'application/xml')