I hope everyone is doing great. I\'ve recently started working with angular 4.4, i\'ve been trying to post data to my api server, but unfortunately it\'s not working. I\'ve spen
have you tried passing headers as the third argument in the post menthod:
this.http.post('http://myapiserver.com', JSON.stringify({name: 'Adam Smith'}), { headers: new Headers({ 'Content-Type': 'application/json' }) }).subscribe(
res => {
const response = res.text();
}
);
make sure you import Headers from @angular/http