Below is a angular service I created to return search results from Indeed job search api via jsonp
(function() {
"use strict";
angular
.module("career.resources")
.factory("JobSearchService", ["$http", jobsearchService]);
function jobsearchService($http) {
return{
getSearchResults: getSearchResults
};
function getSearchResults(publisherKey,keywords,location,jobType,limit) {
return $http.jsonp("http://api.indeed.com/ads/apisearch?", {params: {
"publisher": publisherKey,
"v": "2",
"format": "json",
"callback": "JSON_CALLBACK",
"q": keywords,
"l": location,
"sort": "",
"radius": "",
"st": "",
"jt": jobType,
"start": "0",
"limit": limit,
"fromage": "",
"highlight": "1",
"filter": "1",
"userip": "1.2.3.4"
}});
}
}
}());
When this executes, it throws this error:
Refused to execute script from (url) because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled
This jsonp request should return application/javascript right? I'm confused.
UPDATED
I'm racking my brain with this FYI. Any help would be greatly appreciated...