I am trying to make an AJAX call in angularjs 1.3.15 to a cross-site domain. I have a standard AJAX call working now but would like to use angular's $http config element instead.
my AJAX call now:
var responsePromise = $.ajax({url:"https://some-address.com",
type: "GET",
dataType: "json",
xhrFields: {withCredentials:true},
crossDomain: true});
//my success and error functions
what I tried with $http(config)
var repsonsePromise = $http.get('/some-address.com',{reponseType:{json},
withCredentials:{'true'}});
//my .success and .error functions
I have looked at the $http.get service here
What do I put for the crossDomain: true
argument or is could someone tell me the equivalent syntax of my working AJAX call in order for this to work? Your help is greatly appreciated, thank you in advanced.