title: Get Image as a response from HttpWebRequest in HttpHandler
body: <p>I am using HttpHandler in my Asp.Net MVC project. I have another MVC API project that return image as a response. Using HttpWebRequest I am able to call the API, there is no error in code but I can't view the Image in the page.</p>
  
  <p>My Code:</p>
  
  <p>HttpHandler code:</p>
  
  <pre><code>var currentResponse = HttpContext.Current.Response;
  
  string URL = "http://localhost:50417/API/GetThumbnail";
                      HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL);
                      request.KeepAlive = false;
                      request.ProtocolVersion = HttpVersion.Version10;
                      request.Method = "GET";
                      request.Timeout = 30000;
                      HttpWebResponse response = (HttpWebResponse)request.GetResponse();
  
                      StreamReader streamr = new StreamReader(response.GetResponseStream());
  
  
                      currentResponse.Write(streamr.ReadToEnd());
  </code></pre>
  
  <p>RouteConfig.cs</p>
  
  <pre><code>routes.Add(new Route("Thumbnail/getImage", new ThumbnailImageRouteHandler()));
  </code></pre>
  
  <p>index.csHtml</p>
  
  <pre><code>&lt;img src="/Thumbnail/getImage" /&gt;
  </code></pre>