Since from version beta of ASP.NET Web API, I have used HttpActionContext.RequestContentKeyValueModel to get input parameters from body of POST request:
public override void OnActionExecuting(HttpActionContext actionContext)
{
var requestContentKeyValueModel = actionContext.RequestContentKeyValueModel;
//Do something in here
base.OnActionExecuting(actionContext);
}
but in the new release version RC, this property disappeared, is there any alternative for this?
You can use
HttpContext.Current.Request.Form.EDIT
You can always hide it behind interface:
Inject
IKeyValueProviderin your controllers and mock in your tests.