I want to receive response from server. With Postman works great: Request:
{
"name": "antonio",
"username": "antonio",
"email": "antonio@antonio.pl",
"password": "antonio"
}
Response:
{
"success": true,
"message": "User was successfully registered"
}
Im trying to implement same thing in Angular, so I got:
this.http.post('http://localhost:8090/api/auth/signup',
JSON.stringify({name: name, username: username, password: password, email: email}),
{headers: new HttpHeaders({'Content-Type': 'application/json'})})
.subscribe(res => alert(res[0]));
Checked backend API, works great but alert still is not appearing. Any ideas?