title: Set Accepts in HTTP Request to window.open javascript call
body: <p>I have a window.open command like this:</p>
  
  <pre><code>window.open("http://MyServer/MyPage");
  </code></pre>
  
  <p>And I know that I can set <code>accepts</code> of a request, using something like this:</p>
  
  <pre><code>var client = new XMLHttpRequest();
  client.open("GET", "http://MyServer/MyPage");
  client.setRequestHeader("Accept", "ContentTypeName");
  client.send();
  </code></pre>
  
  <p>Now I need to combine this two things. But I don't know how.
  So...  </p>
  
  <p><strong>How can I set accepts in HTTP header to a call executed by a window.open command?</strong></p>
  
  <p><strong>UPDATED</strong><br>
  Here is a very similar question to that: <a href="https://stackoverflow.com/q/4325968/1233788">window.open with headers</a>.<br>
  And is already <a href="https://stackoverflow.com/a/4326141/1233788">answered</a>.</p>
  
  <p>But as the answer suggests I write in my new window, will be not possible if my content type is a binary like:</p>
  
  <ul>
  <li>application/pdf</li>
  <li>application/vnd.ms-excel</li>
  <li>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</li>
  </ul>
  
  <p>That for my needs these types will be present. So anyone know how I can do it?</p>