We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Attempting to proxy a request with a stream using proxyRequest currently fails as the body is incorrectly read.
proxyRequest
For example, the following will not result in the expected body value of This is a streamed request reaching the /debug path:
This is a streamed request
/debug
app.use( "/", eventHandler((event) => { return proxyRequest(event, url + "/debug", { fetch }); }) ); const stream = new ReadableStream({ start(controller) { controller.enqueue("This "); controller.enqueue("is "); controller.enqueue("a "); controller.enqueue("streamed "); controller.enqueue("request."); controller.close(); }, }).pipeThrough(new TextEncoderStream()); const result = await fetch(url + "/", { method: "POST", body: stream, headers: { "content-type": "application/octet-stream", "x-custom": "hello", }, duplex: "half", }).then((r) => r.json());
I have provided a rough outline of the problem and potential solution in #374
The text was updated successfully, but these errors were encountered:
streamRequest
This is opt-in supported via #413 please check nightly channel in readme if you like to early test.
Sorry, something went wrong.
No branches or pull requests
Describe the feature
Attempting to proxy a request with a stream using
proxyRequest
currently fails as the body is incorrectly read.For example, the following will not result in the expected body value of
This is a streamed request
reaching the/debug
path:Additional information
I have provided a rough outline of the problem and potential solution in #374
The text was updated successfully, but these errors were encountered: