Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bufferBody property to http request #4

Merged
merged 1 commit into from
Aug 23, 2022
Merged

Add bufferBody property to http request #4

merged 1 commit into from
Aug 23, 2022

Conversation

ejizba
Copy link
Contributor

@ejizba ejizba commented Aug 19, 2022

Related to Azure/azure-functions-nodejs-worker#294, we want to add a property on the http request that provides the body as a buffer. In order to do that we need to:

  1. Turn on the RawHttpBodyBytes capability in the worker. This tells the host to send us the body in bytes, never a string. (NOTE: We don't want bytes and string because that duplicates the data sent over rpc and the data can be large)
  2. Since the host no longer converts it to string for us, we have to replicate the previous host behavior for existing properties (body and rawBody) so that we don't break people

And replicate old host behavior to prevent breaking changes
Copy link
Contributor

@hossam-nasr hossam-nasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with the caveat that all the decoding/encoding stuff completely flies over my head, but I trust you did your due diligence😛

@ejizba ejizba merged commit f9c5430 into v3.x Aug 23, 2022
@ejizba ejizba deleted the ej/raw branch August 23, 2022 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants