-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[Blazor WebAssembly] Support for Cancelling HTTP Requests by Diposing Response Stream #64225
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsWhen working with In Blazor WebAssembly this is currently not possible, as
Such a change would be a great improvement for scenarios like consuming async streams coming from servers.
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsWhen working with In Blazor WebAssembly this is currently not possible, as
Such a change would be a great improvement for scenarios like consuming async streams coming from servers.
|
I'm experiencing the same issue. I probably posted in the wrong channel. I was advised to link it here. Would someone consider this fix for .net 6? I'm working on a blazor wasm production app and it would be helpful if user initiated cancels on token sources aborted http connections to the server api so that the asp.net core api treats the RequestAborted as a cancelled token and I can also cascade up cancellation of pending server operations. Thanks. |
When working with
ReadableStream
in JavaScript, one can callReadableStreamDefaultReader.cancel()
which will triger request cancellation if the server is still streaming.In Blazor WebAssembly this is currently not possible, as
WasmHttpReadStream
uses the reader only to advance theReadableStream
and on dispose only diposes the references to JavaScript objects. It looks like this functionality could be achieved by adding call tocancel()
inWasmHttpReadStream.Dispose
.Such a change would be a great improvement for scenarios like consuming async streams coming from servers.
The text was updated successfully, but these errors were encountered: