asp.net-coremiddlewarehttpresponsebufferingasp.net-core-middleware

What is the replacement of IApplicationBuilder.UseResponseBuffering starting from .net Core 2+


Since the package Microsoft.AspNetCore.Buffering has been deprecated after .net Core 1.1, what is the best practice to restore the feature provided by IApplicationBuilder.UseResponseBuffering()?


Solution

  • As this issue said, this is feature may be released at the .net 8.

    Besides, if you want to disable or enable the response buffering, I suggest you could consider using the IHttpResponseBodyFeature. It contains the buffering settings for response body.