Say I have a Controller with the following method:
public int Get(DateTime date)
{
// return count from a repository based on the date
}
I'd like to be able to access method while passing the date as part of the URI itself, but currently I can only get it to work when passing the date as a query string. For example:
Get/2012-06-21T16%3A49%3A54-05%3A00 // does not work
Get?date=2005-11-13%205%3A30%3A00 // works
Any ideas how I can get this to work? I've tried playing around with custom MediaTypeFormatters, but even though I add them to the HttpConfiguration's Formatters list, they never seem to be executed.