Trying to use fetch and pass in mode: no-cors

后端 未结 6 884
悲&欢浪女
悲&欢浪女 2020-11-22 02:33

I can hit this endpoint, http://catfacts-api.appspot.com/api/facts?number=99 via Postman and it returns JSON

Additionally I am using create

6条回答
  •  忘掉有多难
    2020-11-22 03:35

    If you are using Express as back-end you just have to install cors and import and use it in app.use(cors());. If it is not resolved then try switching ports. It will surely resolve after switching ports

提交回复
热议问题