angular2 http post with subscribe and catch
Why don't we use catch when calling http post construct? For example,
this.http.post(APPLICATION_HOST + '/employee/save', payload, {headers : headersJson})
.catch(err => {
console.log(err);
}
Http Post is lazily instantiated with subscribe method call. That's why the code below is better :-
Comments