title: HTTP requests until header has attachment
body: <p>We have a web application which upon visiting the url, will prepare and generate a <code>.zip</code> file which is then downloaded.</p>
  
  <p>I need to create a nodejs application using <code>requestjs</code> that can keep making requests until there is an attachment header, from which point it would be downloaded.</p>
  
  <p>The page which generates the <code>.zip</code> file contains a simple html message, stating that the file is being prepared for download. With a javascript <code>reload(true)</code> function called on load.</p>
  
  <p>I'm not sure if this is the right way of doing it, but I am open to suggestions.</p>