6.39The HttpContextForwardBuilder Builder
Created on Aug 17, 2026~2 min read
The HttpContextForwardBuilder builder is provided by the framework specifically for configuring the various settings required to convert the HttpContext request context. The constructor of HttpContextForwardBuilder is private, so it cannot be instantiated directly with the new keyword. However, the framework provides multiple extension method overloads of HttpContext.CreateForwardBuilder to create instances of HttpContextForwardBuilder.
httpContext.CreateForwardBuilder(httpMethod, requestUri, forwardOptions); // The type of the forwardOptions parameter is HttpContextForwardOptionshttpContext.CreateForwardBuilder(requestUri, forwardOptions); // Automatically obtains HttpContext.Request.Method for configurationThe framework does not yet provide the ability to manually construct HttpContextForwardBuilder and forward using the Send/SendAsync methods; please use the ForwardAsync-related methods instead.