Android 为什么我的提取请求在react native中出现问题网络请求错误

Android 为什么我的提取请求在react native中出现问题网络请求错误,android,react-native,fetch,hybrid-mobile-app,Android,React Native,Fetch,Hybrid Mobile App,我已经写了这段代码,但我总是得到一个网络请求失败的错误 const res = await fetch('https://mydomain:8099/login', { method: 'POST', headers: { 'Accept': '*/*', 'Content-Type': 'application/json', "Access-Control-Allow-Origin": "*", }, body:

我已经写了这段代码,但我总是得到一个网络请求失败的错误

const res = await fetch('https://mydomain:8099/login', {
    method: 'POST',
    headers: {
        'Accept': '*/*',
        'Content-Type': 'application/json',
        "Access-Control-Allow-Origin": "*",
    },
    body: JSON.stringify({
        user: "my user name",
        password: "my password"
    })
});
console.log(res);
return res;

你有没有在类似postman的东西中测试API?是的。我的API与postman配合得很好。你能试着在info.plist中添加这个吗?是的。我试过了。它允许对IOS进行http请求。您是否在类似postman的程序中测试了API?是的。我的API与postman配合得很好。你能试着在info.plist中添加这个吗?是的。我试过了。它允许对IOS进行http请求。