react js 获取请求需要 22 秒才能获得响应

时间:2021-08-01 20:03:48

标签: node.js reactjs axios fetch-api

您好,我正在向路由/getAllBlogs 发送获取请求

但由于某种原因,网络请求停止,加载数据至少需要 22 秒。 enter image description here

enter image description here

获取代码。

useEffect(() => {
     fetch(BASE_URL + "/getAllBlogs")
      .then((response) => response.json())
      .then((dta) => {
        console.log(dta)
      })
      .catch((err) => {})
 

  }, []);

0 个答案:

没有答案