Last post Oct 06, 2014 12:54 AM by damienBod
Oct 01, 2014 02:26 PM|krwell|LINK
I have an API that return a stream as part of the HttpResponseMessage. The stream represents a file to be downloaded to the browser. I am not trying to write a method to call the API and ReadAsAsync the stream. I keep getting an error about "No MediaTypeFormatter
is available to read an object of type 'Stream' from content with media type 'application/octet-stream'."
Am I missing something?
Oct 06, 2014 12:54 AM|damienBod|LINK
Yes, you need to add a media formatter for application/octet-stream. Per default, only xml and json are supported. You could also use the MultipartFormDataStreamProvider class instead.