title: Response 200 OK but Jquery shows error?
body: <p>I am stuck in kind of a weird problem where I am trying to make a <code>JSONP</code> request to the Open Weather history API to get the weather information for the previous years on the a particular date.</p>
  
  <pre><code>fetchHistoryUrl = 'http://78.46.48.103/data/3.0/days?day=0622&amp;mode=list&amp;lat=39.77476949&amp;lon=-100.1953125';
  $.ajax({
      method: 'get',
      url: fetchHistoryUrl,
      success: function(response){
          console.log(response);
      },
      error   : function (jqXHR, textStatus, errorThrown) {
          if (typeof console == 'object' &amp;&amp; typeof console.log == 'function') {
              console.log(jqXHR);
              console.log(textStatus);
              console.log(errorThrown);
          }
      }
  });
  </code></pre>
  
  <p>This gives me the CORS issue.</p>
  
  <p>So I add:</p>
  
  <pre><code>dataType: 'jsonp',
  </code></pre>
  
  <p>But then I get an error saying <code>"parsererror"</code> which means it cannot parse the response as valid JSON I guess. The response code is 200 OK though.</p>
  
  <p>So if I don't make it a <code>jsonp</code> request I have the CORS problem, but if I do, I get a parse error. How do I go around this problem? </p>
  
  <p><strong>Edit</strong></p>
  
  <p>When I include <code>dataType: 'jsonp',</code></p>
  
  <pre><code>Object { readyState: 4, getResponseHeader: .ajax/v.getResponseHeader(), getAllResponseHeaders: .ajax/v.getAllResponseHeaders(), setRequestHeader: .ajax/v.setRequestHeader(), overrideMimeType: .ajax/v.overrideMimeType(), statusCode: .ajax/v.statusCode(), abort: .ajax/v.abort(), state: .Deferred/d.state(), always: .Deferred/d.always(), then: .Deferred/d.then(), 10 more… } jquery.min.js line 2 &gt; eval:117:7
  "parsererror" jquery.min.js line 2 &gt; eval:118:7
  Error: jQuery21102812510521974031_1434973061927 was not called
  Stack trace:
  .error@http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js:2:1821
  b.converters["script json"]@http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js:4:16291
  vc@http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js:4:7397
  x@http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js:4:10802
  .send/c@http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js:4:15583
  n.event.dispatch@http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js:3:6352
  n.event.add/r.handle@http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js:3:3162
  </code></pre>
  
  <p>When I don't include it:</p>
  
  <pre><code>Object { readyState: 0, getResponseHeader: .ajax/v.getResponseHeader(), getAllResponseHeaders: .ajax/v.getAllResponseHeaders(), setRequestHeader: .ajax/v.setRequestHeader(), overrideMimeType: .ajax/v.overrideMimeType(), statusCode: .ajax/v.statusCode(), abort: .ajax/v.abort(), state: .Deferred/d.state(), always: .Deferred/d.always(), then: .Deferred/d.then(), 10 more… } jquery.min.js line 2 &gt; eval:117:7
  "error" jquery.min.js line 2 &gt; eval:118:7
  "" jquery.min.js line 2 &gt; eval:119:7
  Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://78.46.48.103/data/3.0/days?day=0622&amp;mode=list&amp;lat=39.77476949&amp;lon=-100.1953125. (Reason: missing token 'x-csrf-token' in CORS header 'Access-Control-Allow-Headers' from CORS preflight channel). &lt;unknown&gt;
  Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://78.46.48.103/data/3.0/days?day=0622&amp;mode=list&amp;lat=39.77476949&amp;lon=-100.1953125. (Reason: CORS request failed).
  </code></pre>