Delegate handler use to track the incoming request in your web api project, so we register delegate handler in global.asax file after creation, it may be useful in tracking for request and response for request coming for actions.
A message handler is a class that receives an HTTP request and returns an HTTP response. Message handlers derive from the abstract HttpMessageHandler class.
Typically, a series of message handlers are chained together. The first handler receives an HTTP request, does some processing, and gives the request to the next handler. At some point, the response is created and goes back up the chain. This pattern is called a delegating handler.
Server-Side Message Handlers
On the server side, the Web API pipeline uses some built-in message handlers:
- HttpServer gets the request from the host.
- HttpRoutingDispatcher dispatches the request based on the route.
- HttpControllerDispatcher sends the request to a Web API controller.
No comments:
Post a Comment