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

2

87
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.

Income answered 8/8, 2019 at 7:35 Comment(1)
github.com/aspnet/AspNetCore/issues/12505Fipple
A
134

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

Ambriz answered 25/9, 2019 at 0:29 Comment(0)
I
0

EnableBuffering() internally calls EnableRewind(). We can see below definition of HttpRequestRewindExtensions class.

public static class HttpRequestRewindExtensions
{
    public static void EnableBuffering(this HttpRequest request)
    {
        BufferingHelper.EnableRewind(request);
    }
}
Institution answered 10/4, 2023 at 10:35 Comment(1)
Welcome to Stack Overflow! Please don't post duplicate answers; as you can see, this same answer has already been posted here. See How to Answer for more information on how to write good answers. I also recommend you take the tour for a basic intro to what Stack Overflow is.Dapple

© 2022 - 2024 — McMap. All rights reserved.