Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to filter Request Response before reaching to Web Api controller

Hi I am working with Web Api 2, is their any way I can handle request and response before reaching to the API controller.

like image 1000
Utsav Avatar asked Feb 24 '14 07:02

Utsav


Video Answer


1 Answers

You may be looking for a DelegatingHandler. These are HTTP Message Handlers that can process the request before it reaches the Controller and can also process the response on the way out of the pipeline. Delegating Handlers can also return the response themselves without calling the rest of the pipeline. You can read about Delegating Handlers here.

like image 129
Jon Susiak Avatar answered Sep 22 '22 10:09

Jon Susiak