I started working in a company where the network is ruled by a proxy. I already spent a lot of time just figuring out how to re install cordova and ionic while dealing with the proxy, and now Im struggling on this problem :
In a service Im retrieving data from an .ics file, that I parse to json and display in my view. At home or anywhere else it works fine but here, the proxy is blocking the process and says : 407 : "Proxy Authentication Required".
Here is my service
angular
.module("service")
.factory("edt", edtService);
function edtService($q, $http) {
var urlCalendar = 'https://planning.univ-tln.fr/Telechargements/ical/EdT_'myNameHere'.ics?version=14.0.2.1&idICal=29B629A9A9CD62183CF9858588E734D7¶m=643d5b312e2e36325d2666683d3126663d31';
this.getCalendar = getCalendar;
function getCalendar() {
var deferred = $q.defer();
$http.get(urlCalendar).then(_parseIcs, deferred.reject);
function _parseIcs(success) {
var calData = window.ICAL.parse(success.data);
return deferred.resolve(calData[2]);
}
return deferred.promise;
}
return this;
}
I already had to specify proxy settings in some files (like .bowerrc and .npmrc, for installing cordova and ionic) but I don't see where to specify the use of a proxy in angular $http... Any help is welcome :) I tried my best to be clear..
EDIT: Maybe I can work with interceptors? just an idea..
Ok, that was kind of my bad... I was indeed using a specific proxy for connection (in 'internet options/network settings/proxy') and by unchecking it and checking 'automatically detect settings', it now works fine ! I feel so dumb right now... :) Problem solved, thanks @Nitishkumar Singh for your time tho !