title: downloading a file that comes as an attachment in a POST request response in PhantomJs
body: <p>I want to download a CSV file, it is generated on a button click through a POST request. I researched to my best on casperJs and phantomJS forums and returned empty handed. In a normal browser like firefox, a browser download dialog window appears after the post request. How to handle this case in PhantomJS</p>
  
  <pre><code>TTP/1.1 200 OK
  Cache-Control: private
  Content-Type: text/html; charset=utf-8
  Content-Encoding: gzip
  Vary: Accept-Encoding
  Server: Microsoft-IIS/7.5
  Content-disposition: attachment;filename=ExportData.csv
  X-AspNet-Version: 2.0.50727
  X-Powered-By: ASP.NET
  Date: Fri, 19 Apr 2013 23:26:40 GMT
  Content-Length: 65183
  </code></pre>