【问题标题】:error integrating api https://api.itbook.store/1.0/错误集成 api https://api.itbook.store/1.0/
【发布时间】:2022-11-23 11:36:21
【问题描述】:

我想看看是否有人可以集成和使用这个 API。我有以下错误。感谢您的帮助,这是我作为开发人员的第一份工作,对我来说非常重要,谢谢! (https://i.stack.imgur.com/1dvvx.png)

api页面如下https://api.itbook.store/ api如下https://api.itbook.store/1.0/

这是我尝试整合它的方式

 useEffect(() => {
    const getProducts = async () => {
      setLoading(true);
      const response = await fetch("https://api.itbook.store/1.0/");
      if (componentMounted) {
        setData(await response.clone().json());
        setFilter(await response.json());
        setLoading(false);
      }
      return () => {
        componentMounted = false;
      };
    };
    getProducts();
  }, []);

这是抛出我的错误

(https://i.stack.imgur.com/AEvHZ.png)

【问题讨论】:

    标签: node.js reactjs api


    【解决方案1】:

    我认为您必须改用https://api.itbook.store/1.0/new

    【讨论】:

      猜你喜欢
      • 2016-12-20
      • 2014-11-11
      • 2016-11-16
      • 1970-01-01
      • 2016-07-27
      • 1970-01-01
      • 2016-12-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多