React: Axios Network Error

后端 未结 7 1598
既然无缘
既然无缘 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:34

    my problem was about the url I was requesting to. I hadn't inserted http:// at the beginning of my url. I mean I was requesting to a url like 92.920.920.920/api/Token instead of http://92.920.920.920/api/Token. adding http:// solved my problem.

    0 讨论(0)
提交回复
热议问题