My WebAPI method looks like this:
[Route("api/v1.0/Profile/Test/{offset}")]
public async Task<ServiceResult> GetTest(DateTimeOffset offset)
{
...
}
Calling it like this works: http://localhost:54295/api/v1.0/Profile/Test/2016-04-05T13:30:44-11:00
However, this call won't work: http://localhost:54295/api/v1.0/Profile/Test/2016-04-05T13:30:44+11:00
What's the trick here?
In my Web.config in the system.web
section I have this entry:
<httpRuntime targetFramework="4.5" requestPathInvalidCharacters="<,>,%,&,*,\,?" />