Streaming JSON results in real time with HttpClient.GetFromJsonAsAsyncEnumerable doesn't work in the WASM stack #110287
-
Currently, Edit: I should clarify that this is a client-side issue. Assuming the server is properly streaming results and the client browser is receiving them as early as possible, My questions are these:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
That's up to the server producing the data. If the server doesn't proactively flush then of course the client can't see the result right away. Are you able to create a minimal runnable repro that reproduces the issue? |
Beta Was this translation helpful? Give feedback.
-
I met this issue before when using the response compression, not sure if the same case, hope it helps |
Beta Was this translation helpful? Give feedback.
Ah, the client in this case is running via WebAssembly on the client browser itself, that uses a different networking stack.
There, responses are not streamed by default, and you have to opt back in via
SetBrowserResponseStreamingEnabled
.Changing your sample from
to
gets you the streaming behavior as expected.
There's som…