title: jquery.ajax Access-Control-Allow-Origin
body: <p>So here is my call:</p>
  
  <pre><code>   $.ajax({
         url: url,
         headers: { 'Access-Control-Allow-Origin': '*' },
         crossDomain: true,
         success: function () { alert('it works') },
         error: function() {alert('it doesnt work')},
         datatype: 'jsonp'
     });
  </code></pre>
  
  <p>My url is legit.  You will notice that i do not have data set.  I m not sure if datatype is working properly as its actually xml being returned, but i tried that too.  Its a call to sportsdata's api.  On the site, they show you a request header of x-originating-ip so i have tried that where <strong>access-control-allow-origin</strong> is.  </p>
  
  <p>All of this still returned the <strong>access-control</strong> error.  I am not clear on what data is if i set it, so i have omitted it for now.  I have tried a few different things i googled, i understand why i am getting the error. I do not know how to fix it. I tried to not have to ask, but if someone could explain or show me the way, that would be greatly appreciated</p>