I\'m upgrading to Angular to version 5, I was using @angular/http
before and now I need to update to @angular/common/http
and use HttpClient
I a
As per my consideration you can call function of that service in your success responce and process your data in function and return it to back it.
return this.http.get(url, {headers: this.headers}).map(
(response: Response) => {
const data = response.json();
return this.processData(data);
}
).catch(
(error: Response) => {
return Observable.throw(error);
}
);
public processData(data : any){
//process your data
return data;//this is processed data
}