Hello.
I’m trying to get the results of the post request and Ionic returns null. Postman returns valid json.
What’s my mistake?
this.httpClient.post('http://devel.do-kirov.ru/app_vyatsu/login',
JSON.stringify({ username: encodeURIComponent(this.username), pass: encodeURIComponent(this.password) }),
{ headers: new HttpHeaders({
'Content-Type': 'application/json'
}),
responseType: 'text' })
.subscribe(
data => {
console.log(data);
},
err => {
console.log(err);
});