Service.ts
From this function I get like response a JSON like below:
public signupuser(user: Users): Observable<boolean> {
let headers = new Headers();
headers.append('Content-Type', 'application/json');
let body = user;
return this.http.post(Api.getUrl(Api.URLS.signup), body, {
})
.pipe(map((response: Response) => {
console.log('response', response)
return true;
}));
}
JSON:
response {
"email": "usertest@gmail.com",
"nome": "user",
"cognome": "test",
"abbonato": 0,
"cityid": "22",
"msg": "Registered correctly."
}
When I use it from Postman I get and status 200 OK or any status error
My question is: How to use this status from code, When this status code is not present in JSON file? Or any idea please?
Any idea please?
Update:
How to read and X-JWT that is in header like in