web api get route template from inside handler

后端 未结 4 1531
春和景丽
春和景丽 2021-01-12 06:05

I searched a lot before putting the questions here but the more I search the more confused I get.

So I have created an handler and I am trying to get the route like

4条回答
  •  醉话见心
    2021-01-12 06:23

    I had a similar issue, but was able to get the route inside the message handler by the following:

    request.GetConfiguration().Routes.GetRouteData(request).Route.RouteTemplate;

提交回复
热议问题