Как получить доступ к данным Django локального сервера с помощью React-native? - PullRequest
0 голосов
/ 01 августа 2020

Я создаю Django API, используя django rest framework. И хочу получить доступ к данным ответа json api в моем приложении, поддерживающем реакцию. Но возникает ошибка ( Ошибка сетевого запроса )

DJANGO ОТВЕТ enter image description here

REACT-NATIVE введите описание изображения здесь

ОШИБКА

Ошибка сетевого запроса

  • node_modules / whatwg-fetch / dist / fetch. umd. js: 505: 17 в setTimeout $ argument_0
  • node_modules / react-native / Libraries / Core / Timers / JSTimers. js: 135: 14 в _callTimer
  • node_modules / react-native / Libraries / Core / Timers / JSTimers. js: 387: 16 в callTimers
  • node_modules / react-native / Libraries / BatchedBridge / MessageQueue. js: 425: 19 в __callFunction
  • node_modules / react-native / Libraries / BatchedBridge / MessageQueue. js: 112: 6 в __guard $ argument_0
  • node_modules / react-native / Libraries / BatchedBridge / MessageQueue. js: 373 : 10 в __guard
  • node_modules / react-native / Libraries / BatchedBridge / MessageQueue. js: 111: 4 в callFunctionReturnFlastedQueue
  • [собственный код]: null в callFunctionReturnFlastedQueue
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...