title: jquery .ajax() GET request sending OPTIONS
body: <p>I am trying to send an ajax request from my localhost development box to a server using</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;JSSample&lt;/title&gt;
      &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;script type="text/javascript"&gt;
      $(function() {
          var params = {
              format: "JSON",
              season: "2015REG"
              // Request parameters
          };
  
          $.ajax({
              url: "https://&lt;mysite&gt;/sub/" + params.format + "/" + params.season,
              beforeSend: function(xhrObj){
                  // Request headers
                  xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","&lt;mykey&gt;");
              },
              type: "GET"
          })
          .done(function(data) {
              alert("success");
              console.log("Data: \n" + JSON.stringify(data));
          })
          .fail(function(error) {
              alert("error");
              console.log("Error" + JSON.stringify(error));
          });
      });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>when I look into firefox i see that it is actually sending an OPTIONS request - which is not responded to by the server (404 not found) , so I then get a Cross-Origin Request blocked error.</p>
  
  <pre><code>OPTIONS 
  XHR 
  https://mysite [HTTP/1.1 404 Resource Not Found 2437ms]
  Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://mysite (Reason: CORS header 'Access-Control-Allow-Origin' missing).
  </code></pre>
  
  <p>What am I doing wrong? Why is jquery trying to ask for options when I am explicitly sending a GET? Also, I don't own this server, its another company, that has a subscription API, so I can't give out the key or anything to help troubleshoot.</p>