Проблема с компьютерными разрешениями в React Native, Expo, Axios - PullRequest
1 голос
/ 14 марта 2019

Внутри React Native с Axios Я делаю запрос с помощью axios на удаленный URL. Я продолжаю получать эту ошибку, если я пытаюсь сделать запрос.

The file “Macintosh HD” couldn’t be opened because you don’t have permission to view it.

Вот мой код:

// inside componentDidLoad()

ExampleService.index().then(response => {
  console.log('service response: ',response);
})
// in side ExampleService.js
function index() {
  return client({
    url:    `/`,
    method: 'GET'
  });
}
// inside client

const client = axios.create({
  baseUrl: 'http://192.168.42.64:3000',
  headers: {
    // 'Authorization': authHeader,
    'Content-Type': 'application/json'
  }
});
...