title: Downloading a PDF returned as a byte ResponseEntity
body: <p>I'm trying to get a download to open from a call to another function that returns it as a ResponseEntity Byte. The problem is that when it returns it isn't downloading in the browser. A download box will open when I query the function I'm calling directly. </p>
  
  <pre><code>byte[] content = ...//gets the content
  HttpHeaders header = new HttpHeaders();
  header.setContentType(MediaType.parseMediaType("application/pdf"));
  
  return new ResponseEntity&lt;byte[]&gt;(contents, header, HttpStatus.OK);
  </code></pre>
  
  <p>why isn't a download box coming up in the browser when I call this from the javascript? am I missing something?</p>