title: How to use JSONP on fetch/axios cross-site requests
body: <p>I'm trying to do a GET request on wikipedia API. Using jQuery as below works fine:</p>
  
  <pre><code>$.ajax({
    url: 'https://en.wikipedia.org/w/api.php?format=json&amp;action=query&amp;generator=search&amp;gsrnamespace=0&amp;gsrlimit=10&amp;prop=pageimages|extracts&amp;pilimit=max&amp;exintro&amp;explaintext&amp;exsentences=1&amp;exlimit=max&amp;gsrsearch=Test&amp;callback=JSON_CALLBACK',
    type: 'GET',
    headers: {'X-Requested-With': 'XMLHttpRequest'},
    crossDomain: true,
    dataType: 'jsonp'
  }).done(function(data) {
    console.log("Data: ", data);  
  });
  </code></pre>
  
  <p>But I want to use fetch or axios api, which stops at <strong>pre-flight</strong> with request method: <strong>OPTIONS</strong>. Why it works in jQuery but not in the other APIs?</p>
  
  <pre><code>axios.get('https://en.wikipedia.org/w/api.php?format=json&amp;action=query&amp;generator=search&amp;gsrnamespace=0&amp;gsrlimit=10&amp;prop=pageimages|extracts&amp;pilimit=max&amp;exintro&amp;explaintext&amp;exsentences=1&amp;exlimit=max&amp;gsrsearch=Test&amp;callback=JSON_CALLBACK', 
      { headers: {'X-Requested-With': 'XMLHttpRequest',
                  'content-type': 'text/plain'}
      })
      .then(function (response) {
          console.log("Response: ", response);  
      });
  </code></pre>
  
  <p>I saw that it might be related to the Content-Type of the GET request, on jQuery the default seems to be <strong>text/plain</strong>, however I didn't have success when trying to alter the content-type of fetch/axios requests which are being sent as <strong>text/html</strong>.</p>
  
  <p>Any thoughts on what might be the problem?</p>