I see a lot of tutorials doing something like this:
http.get(\"...\").subscribe( success => console.log(\'hello success\'), error => console.log(\'bye
It works for me:
this.http.post('http://example.com/path/', {sampleData: 'd'}).subscribe( res => {alert('ok!');}, err => {alert(err.error)} )