angular2 http post with subscribe and catch

Why don't we use catch when calling http post construct? For example, + '/employee/save', payload, {headers : headersJson})
.catch(err => {

Http Post is lazily instantiated with subscribe method call. That's why the code below is better :-


Popular posts from this blog

Solving Sonarqube :- Project was never analyzed. A regular analysis is required before a branch analysis

spark - pyspark reading from excel files