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

Http stream support #212

Merged
merged 4 commits into from
Feb 1, 2024
Merged

Http stream support #212

merged 4 commits into from
Feb 1, 2024

Conversation

ejizba
Copy link
Contributor

@ejizba ejizba commented Jan 30, 2024

HTTP stream support should require minimal changes by the user. The only thing required is turning on this flag:

import { app } from '@azure/functions';

app.setup({ enableHttpStream: true });

Otherwise it's up to them to use the existing HTTP request/response types as streams instead of buffers.

I've added end-to-end tests here which can be used as sample code for now: Azure/azure-functions-nodejs-e2e-tests#32

Lastly, the only known problem is that the request.params object will not be populated. Plenty of scenarios don't need this and users should be able to workaround the problem by parsing the url themselves, so I'd rather get this moving while we figure that specific feature out offline.

Depends on v3.9.0 of the worker which has finished rolling out in Azure with host v4.28, but we don't have an official core tools release yet.

Related to #97
Related to #171

@ejizba ejizba requested a review from castrodd January 30, 2024 01:50
src/InvocationModel.ts Outdated Show resolved Hide resolved
src/http/HttpRequest.ts Outdated Show resolved Hide resolved
@ejizba ejizba mentioned this pull request Jan 31, 2024
@ejizba ejizba merged commit 02f7ba3 into v4.x Feb 1, 2024
11 checks passed
@ejizba ejizba deleted the ej/httpStream branch February 1, 2024 19:48
@amcdnl
Copy link

amcdnl commented Feb 13, 2024

Was this released in the 4.2.0 release 2 weeks ago? If not, is there an ETA?

@ejizba
Copy link
Contributor Author

ejizba commented Feb 13, 2024

No it wasn't, please see #97 (comment)

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.

3 participants