![](/img/trans.png)
[英]error in react Native while show featch json data in render()
[英]React native ios http featch method fail
如何访问 react native ios http featch
fetch('http://10.0.2.2:53396/index.cfm/?fwreinit=1', {
method: 'POST',
headers: { 'Accept': 'application/json','Content-Type': 'application/json',},
body: JSON.stringify({ public_key: "Arunkumar" ,private_key: "cfarun",})
}).then((response) => response.json())
.then((responseData) => {
console.log(responseData);
})
在这里回答
默认情况下,iOS 将阻止任何未使用 SSL 加密的请求。 如果您需要从明文 URL(以 http 开头的 URL)中获取,您首先需要添加应用传输安全例外。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.