Image File as Response from .NET Web API

When developing a web API, it is often required to send response as a PDF or image file.Following lines of code will assist to create method that will override the default media type of the response determined by Content Negotiation. public HttpResponseMessage GetImage()        {            byte[] bytes =... » read more