简体   繁体   中英

Axios with django server on localhost

Trying to access django server on localhost from my react native app. All I get is Network Error, which doesn't say much. Tried changing info.plist file as suggested in other answers on stack, tried changing firewall settings and so on.

The thing that worked and solved all my problems was changing the url on axios to my local ip and running django server with command: python manage.py runserver 0.0.0.0 which to my understanding will accept any connection to the server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM