Skip to content

Http stream support - #212

Merged
Eric Jizba (ejizba) merged 4 commits into
v4.xfrom
ej/httpStream
Feb 1, 2024
Merged

Eric Jizba (ejizba) merged 4 commits into
v4.xfrom
ej/httpStream

Conversation

@ejizba

@ejizba Eric Jizba (ejizba) commented Jan 30, 2024 •

Copy link
Copy Markdown
Contributor

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

Comment thread src/InvocationModel.ts Outdated
Comment thread src/converters/toRpcHttp.ts Outdated
Comment thread src/converters/toRpcHttp.ts Outdated
Comment thread src/http/HttpRequest.ts Outdated
Comment thread src/http/HttpRequest.ts
Comment thread src/http/HttpRequest.ts
Comment thread src/http/httpProxy.ts
@ejizba
Eric Jizba (ejizba) merged commit 02f7ba3 into v4.x Feb 1, 2024
@ejizba
Eric Jizba (ejizba) deleted the ej/httpStream branch February 1, 2024 19:48
@amcdnl

Copy link
Copy Markdown

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

@ejizba

Copy link
Copy Markdown
Contributor Author

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