Rest api call from angular app thowing errors to indeed api

Below is a angular service I created to return search results from Indeed job search api:

(function() {
    "use strict";

        .factory("JobSearchService", ["$http", jobsearchService]);

        function jobsearchService($http) {
                  getSearchResults: getSearchResults

             function getSearchResults(publisherKey,keywords,location,jobType,limit) {
                 return $http.get("", {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": ""

When ever this call http request is made i get the following error:

XMLHttpRequest cannot load (url). No 'Access-Control-Allow-Origin' header is present on the requested resoure. Origin 'http://localhost:62510' is therefore not allowed access

Is there a way to bypass this, since I have a api key, to get back data?

I've also unsuccessfully attempted this via a $http.jsonp call here

UPDATED I've tried to accomplish this via $.ajax call also but this happens outside the scope of angular and the data never gets saved to the scope variable.



Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.