Is there a way to specify a 201 response code instead of a 200 for certain endpoints?
Based on the guide (https://github.com/serverless/serverless/blob/master/docs/02-providers/aws/events/01-apigateway.md), it seems like this should be possible, but looking at the underlying code, it looks like the 200 response mapping is hard coded (https://github.com/serverless/serverless/blob/e4846edb21559d56104be678b1099b55f61f003d/lib/plugins/aws/deploy/compile/events/apiGateway/lib/methods.js#L272).
I was expecting to be able to do something like:
myEvent:
handler: myEvent.handler
events:
- http:
path: path/to/myEvent
method: put
response:
headers:
Content-Type: "'text/html'"
template: $input.path('$')
statusCodes:
201:
pattern: ''
Is this at all possible or should I just wait for the new HTTP response support via the Lambda proxy integration? (https://github.com/serverless/serverless/pull/2185)