title: Download octet stream via jQuery
body: <p>I have implemented the following code: </p>
  
  <p>I have an html button like this:</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;button style="background-color: #f39900;" onclick="downCont()"&gt;
      Download all content
  &lt;/button&gt;
  </code></pre>
  
  <p>The <code>downCont()</code> function invoked on click is an <code>ajax POST</code> like this:</p>
  
  <p><strong>JQuery</strong></p>
  
  <pre><code>var downCont = function() {
            $.ajax({
                method: "POST",
                contentType: "application/x-www-form-urlencoded",
                url: "&lt;endpoint here&gt;",
                data: {
                  "tokenId": token,
                  "downloadId": "cz98567354",
                  "saveAs": "AllContents"
                }
              })
              .done(function() {
                alert("I have downloaded all contents!");
              });
          });
  </code></pre>
  
  <p>Now, the response of this <code>POST</code> request is used to download an archive of images which is streamed directly to the user <code>(content-type: application/octet-stream)</code>. How can I trigger the download of the archive by the browser itself using <code>jQuery</code>?</p>