Closed wbreza closed 5 years ago
@jon-lewis Even though the default has changed to res
this can always be overriden in your serverless.yml as needed for your implementation.
You can modify your handler definition to include the output binding. When you handler specifies its own output binding then the default is ignored.
health:
handler: src/handlers/health.handler
events:
- http: true
x-azure-settings:
methods:
- GET
authLevel : function
- http: true
x-azure-settings:
direction: out
name: res
Hope this helps.
Perfect. I did test this out and the following settings worked for me.
- http: true
x-azure-settings:
direction: out
name: $return
This updates the default value for the name of the HTTP output binding from
$return
to$res
to work around an issue that existing within the Azure core tools http runtime..A bug exists in the Azure core tools http runtime that evaluates
$return
binding incorrectly which causes serialization issues when returning arrays within an HTTP response. https://github.com/Azure/azure-functions-nodejs-worker/issues/228