Intercept all WebApi calls before the route matching occurs

前端 未结 4 843
青春惊慌失措
青春惊慌失措 2020-12-20 23:29

I am looking for a way to intercept/grab the request being made before matching to a route. For example, I have multiple controllers and routes set up, but I want some mecha

4条回答
  •  悲哀的现实
    2020-12-20 23:55

    Would it work to create a HttpHandler (or do it just in Global asax Application_BeginRequest event) to capture the requests and inside the handler parse the URL against route config, similar to this link.

提交回复
热议问题