What will be the URL for this Get
method?
public class ValuesController : ApiController
{
public string Get(DateTimeOffset startDate)
{
return "value";
}
}
The route template is
routeTemplate: "api/{controller}/{startDate}"
I tried to hit with URLs like
api/values/12Sept2013
api/values/2011-06-01T14:03:00+00:00Z
api/values/2011-12-13
nothing worked.. I even encoded the startDate with HttpUtility.UrlEncode
, but won't work!
Any idea what is the correct format?