title: JavaScript - How to set request header for a browser GET
body: <p>If we do <code>window.location = "http://MyApi.com/Pdf";</code>, browser does a GET of the URL <code>http://MyApi.com/Pdf</code>. But if we want to set <code>authentication</code> header of the request before doing GET of the URL because the server is a REST server and it doesn't support cookies. How to do this? </p>
  
  <p>In all of the cases, I'm using <code>$.ajax</code> to call service but this time I need to show the response in a new window. Response is a PDF file content.</p>
  
  <p>Thanks in advance.</p>