I did test in POSTMAN and work, but in my app dont work
In my page register
newUser(user) {
this.service.postData(user)
.subscribe(
data => console.log(data),
err => console.log(err)
);
}
My service-provider
postData(parameter) {
let headers = new Headers({ 'Content-Type': 'application/x-www-form-urlencoded' });
return this.http.post(this.api + 'client', parameter, {
headers: headers,
method: 'POST'
}).map(
(res: Response) => { return res.json() }
);
}
console.log show this is message
POST https://www.mydomine/api/v1/client 500 (Internal Server Error)
↵ ↵ <meta ch…e>↵↵↵ ↵ ↵", status: 500, ok: false, statusText: “Internal Server Error”, headers: Headers…}
any idea ?