Features are collection of objects you can obtain from the framework at runtime that serve different purposes.
Use this Feature to obtain a list of urls that your app is responding to.
Use
IServer
interface to access server addressess when you don't have access toIApplicationBuilder
.Obtain details of a current request. It has some similarity to HttpContext.Request. They are not equal.
HttpContext.Request
has more properties.Use
IHttpConnectionFeature
interface to obtain local ip/port and remote ip/port.Create your own custom Feature and pass it along from a middleware.
Shows how you can replace an implementation of a Feature with another within the request pipeline.
Use this feature to detect the culture of a web request through
IRequestCultureFeature
.Use session within your middlewares. This sample shows a basic usage of in memory session.
Use session within your middlewares. This sample uses Redis to store session data.
Maximum Request Body Size Feature
Use this feature to read and set maximum HTTP Request body size.
This new Feature interface consolidate previous version's three response body APIs into one
dotnet8