Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Created Issue: HttpRoute.DataTokens can't be usable in web api webhost [746]

$
0
0
After mapping http route:
var route = config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{action}/{id}",
defaults: new { id = RouteParameter.Optional }
);
The route.DataTokens is always null and it's not settalbe. So I can't do something like:
route.DataTokens.Add("key", "value");

The same scenario works in web api selfhost and MVC route.

The DataTokens is useful when you want to provide some additional data to the request. You can use the DataTokens property to retrieve or assign values associated with the route that are not used to determine whether a route matches a URL pattern. These values are passed to the route handler, where they can be used for processing the request.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>