我需要将数据发布到其余 API,但它返回错误 500。当我在 Postman 中测试 API 时,API 正在工作。
身份验证.service.ts
register(email: string, fullName: string,contactNo: string) {
var data = {
'email' : email,
'fullName' : fullName,
'contactNo': contactNo
};
return this.http.post<any>(`http://localhost:80/user`, {data})
.pipe(map(user => {
JSON.stringify(user);
return user;
}));
}