title: Ajax/JSON the server responded with a status of 415 (Unsupported Media Type)
body: <p>The current project I'm working on requires me to talk with the windows live API.  I use an AJAX request to receive a JSON object with the user details.
  How ever I keep getting this error:
  <em>Failed to load resource: the server responded with a status of 415 (Unsupported Media Type)</em></p>
  
  <p>My first idea was to add a "&amp;callback=?" the url. But then I get <em>"Uncaught SyntaxError: Unexpected token :"</em> in the JSON response.</p>
  
  <p>I've been searching on how I could fix the error(s). But found no working solution for both errors. On top if that I'm quite unsure which error I should try solving (status 415 or unexpected token). Anything pointing me in the right direction would be greatly appreciated!</p>
  
  <pre><code>$.ajax({
          url: "https://apis.live.net/v5.0/me?access_token=" + localStorage.getItem('Live_token'),
          dataType: 'json',
          type : 'GET',
          contentType: "application/json;",
          async: false,
          success : function(data) {
              var id = data.id,
              fname = data.last_name,
              email = data.emails.preferred;//TODO preferred or account?
              alert(id + '|' + fname + '|' + email);
              localStorage.setItem('Live_verifier', id + '|' + fname + '|' + email);
          },
          error : function(data) {
              localStorage.removeItem('Live_token');
          }
      });
  </code></pre>
  
  <p>thanks in advance</p>