Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the alternate of HttpRequest.EnableRewind() in ASP.NET Core 3.0?

BufferingHelper.EnableRewind();

Above is an extension method for HttpRequest object in ASP.NET Core 2.2. It is no more there in ASP.NET Core 3.0 (atleast with this name). I want to know it's alternate in ASP.NET Core 3.0. I am not sure if

HttpRequestRewindExtensions.EnableBuffering();

is the alternate.

like image 511
Muhammad Fahad Nadeem Avatar asked Aug 08 '19 07:08

Muhammad Fahad Nadeem


People also ask

What is EnableBuffering?

EnableBuffering(HttpRequest) Ensure the request Body can be read multiple times. Normally buffers request bodies in memory; writes requests larger than 30K bytes to disk. EnableBuffering(HttpRequest, Int32) Ensure the request Body can be read multiple times.

Is ASP NET core deprecated?

NET Framework will be deprecated. This means you can only use . NET Framework as long as your operating systems (for example Windows Server 2019) still supports it.

Which ASP NET core no longer depends on the system?

Fast: ASP.NET Core no longer depends on System. Web. dll for browser-server communication. ASP.NET Core allows us to include packages that we need for our application.


Video Answer


1 Answers

The alternate is HttpRequestRewindExtensions.EnableBuffering(), indeed. You can see here that internally it just calls EnableRewind().

like image 158
Narvalex Avatar answered Oct 06 '22 21:10

Narvalex