Sta*_*tan 5 javascript android native node.js reactjs
我有一个奇怪的问题。它仅发生在通过 Wifi 连接互联网的 Android 上。对 NodeJs 服务器的初始请求最多需要 50 秒。此后的请求正常工作。当设备通过移动互联网发送请求时,不会发生这种情况。它也不会发生在 iOS 设备上。
使用:
发送请求,例如:
return fetch(`URL`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization:
`Bearer ${token}`
}
})
.then((response) => response.json())
.then((json) => {
return json
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
832 次 |
| 最近记录: |