Can OData Action return HttpResponseMessage?

Topics: ASP.NET Web API
May 29, 2013 at 4:08 PM
Hi,

I want to add an action that will return binary(image for example) content, if I would use a GET api I would return HttpResponseMessage, is it possible to do something like that with an action?

Thanks.
Coordinator
May 29, 2013 at 4:48 PM
Absolutely! The simplest way to achieve your scenario is probably to return an HttpResponseMessage with a custom HttpContent that contains the image.

Daniel Roth
Jun 2, 2013 at 3:33 PM
thanks