title: Access-Control-Allow-Origin error when making a HTTP request
body: <p>Hi I'm in the process of authenticating a user via OAuth 2.0 and I'm getting a Access-Control-Allow-Origin error (<code>XMLHttpRequest cannot load https://www.box.com/api/oauth2/token. Origin http://localhost is not allowed by Access-Control-Allow-Origin.</code>) when making the following POST request:</p>
  
  <pre><code>var xhr=new XMLHttpRequest();
  xhr.open('POST',path,true);
  xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  xhr.onload = function() {
      var text = xhr.responseText;
      alert('Response from request to ' + path + ': ' + text);
  };
  xhr.onerror = function() {
      alert('Woops, there was an error making the request.');
  };
  xhr.send(params);
  </code></pre>
  
  <p>Any help would be greatly appreciated!  I've looked into CORS, JSONP, and adding callback=? to the url but nothing I've tried is working.</p>