DEV Community

loading...

Axios is not working on mobile phone

sachinchaurasiya profile image Sachin Chaurasiya ・1 min read

Hello everyone,
I have created a full Stack application and tech stack is (django + reactjs ).
So I have some API calls at front end and I am using Axios for making API calls.
On desktop it is working fine but on Mobile phone it is not working properly. ( Axios is failing to make API calls on mobile phone).

Thank you 😊

Discussion (1)

pic
Editor guide
Collapse
afiasori profile image
AfiasOri

your backend are hosted on a remote server or localhost? you can't use localhost:PORT on another device, but if they share the same router you can change "localhost" to PC's ip address.
to find out your PC's address simply type ipconfig on cmd and find IPv4 Address.
if that's not the case i would like to see some code attachments.