ASP NET Core 3 1 Combining Middleware in a Pipeline - Part 9(a)
This lecture discusses two simple cases of a middleware pipeline using the 1) WelcomePage 2) Static files middleware. The lecture video then goes on to combine some more middleware in the pipeline and brings the explanation of the response generated to a given HTTP request. It brings out the salient points of this middleware pipeline:
• Each middleware component in a pipeline generally addresses a single function
• It handles only one function of a request
• For example, the logging middleware deals with logging the request, Static file middleware only deals with returning static files in the request
• This means we are not forced into having authentication or image resizing behavior in a static file middleware for which there are additional pieces of middleware
• As shown in the previous lecture, to build a complete application, multiple middleware are composed together that form a pipeline.
• Each middleware has access to the original request as well as any changes made to the request by previous middleware
• On the response cycle, each middleware can access/inspect the response and can modify the response as it passes back through the pipeline before being sent to the user
#CombiningMiddleware #ASPNETCORE31 #MiddlewarePipelineASPNETCore
• Each middleware component in a pipeline generally addresses a single function
• It handles only one function of a request
• For example, the logging middleware deals with logging the request, Static file middleware only deals with returning static files in the request
• This means we are not forced into having authentication or image resizing behavior in a static file middleware for which there are additional pieces of middleware
• As shown in the previous lecture, to build a complete application, multiple middleware are composed together that form a pipeline.
• Each middleware has access to the original request as well as any changes made to the request by previous middleware
• On the response cycle, each middleware can access/inspect the response and can modify the response as it passes back through the pipeline before being sent to the user
#CombiningMiddleware #ASPNETCORE31 #MiddlewarePipelineASPNETCore
Comments
Post a Comment