https://www.joshmorony.com/building-mobile-apps-with-ionic-2/observables-in-ionic2.html
this.http.get(url).subscribe(
(data) => {
console.log(data);
},
(err) => {
console.log(err);
},
() => {
console.log("completed");
}
);
In the code above the first event handler handles the onNext response, which basically means "when we detect the next bit of data emitted from the stream, do this". The second handler handles the onError response, which as you might have guessed will be triggered when an error occurs. The final handler handles the onCompleted event, which will trigger once the Observable has returned all of its data.
etc.... just see webpage