Answer the question
In order to leave comments, you need to log in
What is wrong with ajax request using jsonp?
Script code:
$.ajax({
url: "https://api.spotify.com/v1/albums/7qJGcO7e7qVNPi4grufK8B",
dataType: "jsonp",
jsonp: "callback",
type: "GET",
contentType: "application/json; charset=utf-8",
success:function(response){
alert(1);
}
});
Refused to execute script from ' https://api.spotify.com/v1/albums/7qJGcO7e7qVNPi4g... ' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.
Answer the question
In order to leave comments, you need to log in
This particular error can only be resolved on the server side.
+ Judging by the official JSONP documentation, they do not support.
There remains the option of working through a server proxy: https://github.com/spotify/web-api-auth-examples
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question