HTTP Request Pipeline, Middleware, and Filters
Mahmoud Shewita
Full Stack Developer @ Tahseel Information Technology | Bachelor's in Computer Science
HTTP Request Pipeline
When a client (like a web browser) sends a request to a server, the request goes through a series of steps before a response is sent back. This series of steps is called the HTTP request pipeline. Think of it as an assembly line where each step can inspect, modify, or handle the request.
Middleware
Middleware are the individual components or steps in the pipeline. Each piece of middleware can do one or more of the following:
Types of Middleware
领英推荐
Filters
Filters in ASP.NET Core provide a way to run code before or after certain stages in the request processing pipeline. They are more granular and focused on specific actions within the pipeline.
Types of Filters
Difference Between Middleware and Filters
While both middleware and filters are used to handle requests and responses, there are some key differences: