-
Notifications
You must be signed in to change notification settings - Fork 161
fix: Updates default http output binding #308
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
if (bindingUserSettings[constants.webHookType]) { | ||
binding[constants.name] = "res"; | ||
} | ||
binding[constants.name] = "res"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we always want it to be res, or just default to it and still have the option of choosing the $return?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need the option of choosing $return instead of res.
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. Azure/azure-functions-nodejs-worker#228
@jon-lewis Even though the default has changed to You can modify your handler definition to include the output binding. When you handler specifies its own output binding then the default is ignored.
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.Azure/azure-functions-nodejs-worker#228