close

[Solved] React: Axios Network Error

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error React: Axios Network Error in javascript. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How React: Axios Network Error Occurs?

Today I get the following error React: Axios Network Error in javascript.

How To Solve React: Axios Network Error ?

  1. How To Solve React: Axios Network Error ?

    To Solve React: Axios Network Error 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.

  2. React: Axios Network Error

    To Solve React: Axios Network Error 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.

Solution 1

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.

Solution 2

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

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

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment