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
Hi
Test code 1:
private static HttpClient Client { get; } = new HttpClient(); [HttpGet] public async Task<FileStreamResult> Get() { var stream = await Client.GetStreamAsync("http://ipv4.download.thinkbroadband.com/1GB.zip"); return new FileStreamResult(stream, new MediaTypeHeaderValue("application/octet-stream")) { FileDownloadName = "bigfile.zip" }; }
Test code 2:
public async Task Post() { var httpWriter = new StreamWriter(Response.Body); Response.ContentType = "text/event-stream"; byte[] header = Encoding.ASCII.GetBytes("HELLO\n"); await Response.Body.WriteAsync(header, 0, header.Length); await httpWriter.FlushAsync(); try { await Run(httpWriter); } catch (Exception ex) { await httpWriter.WriteLineAsync(ex.ToString()); } } private async Task Run(StreamWriter httpWriter) { for (int i = 0; i < 50; i++) { await httpWriter.WriteAsync($"data: {i}\n\n"); await httpWriter.FlushAsync(); await Task.Delay(300); } }
The text was updated successfully, but these errors were encountered:
Hello, Alex!
Thanks for information! This problem will require serious and long-term research.
But it seems to me, that the best variant for you would be to split your functionality into two web applications: user interface and streaming.
Sorry, something went wrong.
Fixed a error #63 “The middleware blocks content streaming”
a5d10da
Try to upgrade to version 2.4.4.
No branches or pull requests
Hi
Test code 1:
Test code 2:
The text was updated successfully, but these errors were encountered: