What is the correct way to access a header value in a WebApi2 controller? I have method that looks like this:
[Route(Name ="Stuff")]
public SysDataTablePager Get(string sEcho, int iDisplayStart)
It returns paged json data to a jquery DataTable.
I am trying to this to get the search value.
var nameFilter = Convert.ToString(Request["sSearch_1"]);
But I am getting this error:
Cannot apply indexing with [] to an expression of type 'System.Net.Http.HttpRequestMessage'