Did you create a custom media type formatter which can deserialize your data in "application/octet-stream" format?
In media type formatters there is a collection called SupportedMediaTypes to which you would need to add this media type "application/octet-stream". Once you have the custom formatter, you need to add it to the Formatters collection present on the Configuration
object.
When a request is sent to the service, WebAPI looks for the appropriate formatter to deserialize your request based on the incoming request's content-type header.
Kiran Challa
Participant
1442 Points
281 Posts
Microsoft
Re: Custom content negotiation
Mar 14, 2012 05:28 PM|LINK
Did you create a custom media type formatter which can deserialize your data in "application/octet-stream" format?
In media type formatters there is a collection called SupportedMediaTypes to which you would need to add this media type "application/octet-stream". Once you have the custom formatter, you need to add it to the Formatters collection present on the Configuration object.
When a request is sent to the service, WebAPI looks for the appropriate formatter to deserialize your request based on the incoming request's content-type header.
Kiran Challa