I am having this very same issue. I have a custom MediaTypeFormatter, however on my ApiController method Post(string id, SomeObject content). id is coming in as null. however, I can also retrieve it with this.Request.GetRouteData(). Attributing it with
FromUri did not work.
jdothoffman
Member
475 Points
99 Posts
Re: Binding to route value and CustomMediaTypeFormatter
Mar 01, 2012 12:13 AM|LINK
I am having this very same issue. I have a custom MediaTypeFormatter, however on my ApiController method Post(string id, SomeObject content). id is coming in as null. however, I can also retrieve it with this.Request.GetRouteData(). Attributing it with FromUri did not work.
-Blog