【发布时间】:2020-10-27 17:56:36
【问题描述】:
第一次发帖,阅读时请牢记
我尝试过的事情:清除了我的 google chrome 缓存和 cookie,尝试了隐身模式,将我的节点更新到最新版本仍然出现相同的错误。
错误我正在获取 chrome: 无法加载资源:服务器响应状态为 431(请求标头字段太大)
auth.js:22 怀疑它在开发工具中的相关但来源在获取部分给我错误
export const authInit = data => {
const { user, type } = data;
let url;
if (type === "Login") {
url = "/api/auth/login";
} else if (type === "Register") {
url = "/api/auth/register";
}
return dispatch => {
dispatch({ type: actionTypes.LOADING });
return fetch(url, {
method: "POST",
body: JSON.stringify(user),
headers: {
"Content-Type": "application/json"
}
})
.then(res => res.json())
.then(response => {
if (!response.success) {
return dispatch(authError(response.messages));
}
【问题讨论】:
-
你的服务器启动了吗?
-
@xMayank 当然是的
标签: javascript node.js reactjs express redux