In WebApi2, it was customary to put arbitrary objects in HttRequestMessage.Properties. This was usually done using extension methods, such as request.SetUserRights()where SetUserRightsyou simply placed the object in request.Properties[HttpPropertyKey.UserRights].
Now in ASP.NET 5 there is no such property in HttpRequest.
What template is supposed to be used for transferring arbitrary objects together with an HTTP request?
In WebApi to place objects in a request. Commonly used filter filters. We still have filters in AspNet5, so the question can be rephrased as: where should the filter put the general data for the request. Examples of such data can be: current user roles, current user language, etc.
source
share