[Trunk | Library]: piwik.service.ts: Change responseType from default (json) to blob (piwik returns image/gif)
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@56843 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
30bc39aa22
commit
0e59e7b6b4
|
@ -26,8 +26,8 @@ export class PiwikService {
|
||||||
((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):'');
|
((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):'');
|
||||||
//console.log("Piwik - View: " + url);
|
//console.log("Piwik - View: " + url);
|
||||||
// return Observable.of(new Object()).mapTo(true); // for testing
|
// return Observable.of(new Object()).mapTo(true); // for testing
|
||||||
return this.http.get( url);
|
return this.http.get( url, {responseType: 'blob'});
|
||||||
// .do(request => console.info("Piwik request completed" ));
|
// .do(request => console.info("Piwik request completed" ));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ export class PiwikService {
|
||||||
((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):'');
|
((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):'');
|
||||||
//console.log("Piwik - trackDownload: "+url);
|
//console.log("Piwik - trackDownload: "+url);
|
||||||
|
|
||||||
return this.http.get( url);
|
return this.http.get( url, {responseType: 'blob'});
|
||||||
//.do(request => console.info("Piwik request completed" ));
|
//.do(request => console.info("Piwik request completed" ));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue