We are trying to use "current.json" of Yammer rest services in our jquery code
$.ajax({
url: "https://www.yammer.com/api/v1/networks/current.json",
jsonp: "callback",
type: "GET",
dataType: "jsonp",
data: "javascript",
contentType: 'application/json; charset=utf-8',
success: function (response) {
alert(1);
myObj = response;
readJson(response); // server response
},
error: function (xhr, errorText, status) {
alert(-1);
}
every time it goes to the error function however when we see the status code it shows 200. Also we are able to see the response (in JSON format) in browser console.
the exact error we are facing is:
Refused to execute script from 'https://www.yammer.com/api/v1/networks/current.json?callback=jQuery110203706010680180043_1429617947980&_=1429617947981' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.
Does anyone have any solution for this?
Thanks.
$.getJSON
? and fyi - JSONP != rest. – Daniel A. WhitedataType
as JSONP, yet the response is coming back in standard JSON format. – Rory McCrossan