I was trying to find answer but was unable to, so my question is simple, i have this function
getProducts(projectId, pageSize, page) {
return new Promise((resolve, reject) => {
this.http.get('/api/projects/' + projectId + '/products/?pageSize=' + pageSize + '&page=' + page).subscribe(data => {
resolve(data);
}, error => {
reject(error)
});
});
}
I'm trying to read pagination custom header, and in browser response i can see it, but i'm not sure how to access it with my function, on old angular i was using interceptors but on angular 2+ i'm unable to make it work, anyone can show me how to do it ?