title: HttpResponse in Webapi controller in MVC
body: <p>I am using Web api controller as follows:</p>
  
  <pre><code>[HttpPost]    
  public HttpResponseMessage PostMethod(string filename)    
  {
      Stream downloadStream = BL.method(fileName);    
      HttpResponseMessage response = new HttpResponseMessage();    
      response.content= new StreamContent(downloadStream);    
      return response;    
  }
  </code></pre>
  
  <p>When I try to call the above method using fiddler I am getting an exception saying </p>
  
  <blockquote>
    <p>'downloadStream.ReadTimeout' threw an exception of type
    'System.InvalidOperationException'.</p>
  </blockquote>
  
  <p>Can the stream be set in response and sent? Is there any modification for the above code?</p>