Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
VM2233:1未捕获(承诺中)语法错误:JSON中位于位置0的意外标记_Json_Fetch Api - Fatal编程技术网

VM2233:1未捕获(承诺中)语法错误:JSON中位于位置0的意外标记

VM2233:1未捕获(承诺中)语法错误:JSON中位于位置0的意外标记,json,fetch-api,Json,Fetch Api,}) ``在控制台中工作** VM2233:1未捕获(承诺中)语法错误:JSON中位于位置0的意外标记 ** onSubmitSignIn = () => { fetch("http://localhost:3000/signin", { method: "post", headers: { "Content-Type": "application/json" }, body: JSON.strin

})

``在控制台中工作**

VM2233:1未捕获(承诺中)语法错误:JSON中位于位置0的意外标记

**

onSubmitSignIn = () => {
fetch("http://localhost:3000/signin", {
  method: "post",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    email: this.state.signInEmail,
    password: this.state.signInPass,
  }),
})
  .then((response) => response.json())
  .then((user) => {
    if (user.id) {
      this.props.loadUser(user);
      this.props.onRouteChange("home");
    }
  });