React: Axios Network Error

后端 未结 7 1600
既然无缘
既然无缘 2020-12-09 15:35

This is my first time using axios and I have encountered an error.

  axios.get(
    `http://someurl.com/page1?param1=1¶m2=${param2_id}`
  )
  .then(         


        
7条回答
  •  一生所求
    2020-12-09 16:23

    In addition to @jacobhobson answer, I had also used some parameters to made it work.

    app.use(cors({origin: true, credentials: true}));
    

提交回复
热议问题