当我尝试注册新用户时,我会发送带有用户信息的发帖请求。结果,我应该得到新用户的ID。但是Promise不会收到来自服务器的任何请求。
我在服务器上注册了CORS:
app.UseCors(c => c.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader());
邮递员正确获得结果: []
this.axios.post('request_link', this.user)
.then((response) => {
console.log(response);
console.log('user added');
})
.catch(error => console.log(error));
我想获取新用户的ID,但现在没有任何请求。