gpt4 book ai didi

android - 就绪状态“:0 ,"status":0 ,"statusText" :"error" while Call api through AjaxCall Realsed Apk android

转载 作者:行者123 更新时间:2023-11-30 04:58:27 27 4
gpt4 key购买 nike

在使用 ajax 调用访问 API 时出现以下错误

readyState":0,"status":0,"statusText":"error"

Ajax调用方法:

var deviceId = FCM_Tocken_localStorage_GET();
//console.log(" Status ~~~~~~~~~~~~~~~~~~~~~~~~~~~> " + deviceId);
// alert(deviceId);
//debugger
var site = window.localStorage.getItem("site_id");

$.ajax({
url: baseURL + '/api/saveDeviceId?deviceId='+deviceId,
type: 'POST',
success: function(result) {
console.log("ResponseMessage----------------> " + JSON.stringify(result));
// alert(JSON.stringify(result));
if (result.status == "success") {
} else {
}
// $(".modal").hide();
},
error: function(exception) {
alert(JSON.stringify(exception));
console.log('Exception:~~~~~~~~~~~~~~~~~~~~~> ' + exception);
// $(".modal").hide();
}

})

请让我帮助解决这个问题

最佳答案

最后我找到了答案,如下所示:

// A new webclient that ignore ssl errors
private class IgnoreSSLErrorWebViewClient extends WebViewClient {
// You can call the class anything

@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error)
{
handler.proceed(); // When an error occurs, ignore and go on
}
}
The site has issues with SSL certificate verification. The default WebViewClient stops loading when there is an SSL verification error. This extension will instruct it to disregard the error and proceed.

from this link I found my answer 那个用于 webwiew 它也适用于 Cordova Android 应用程序

关于android - 就绪状态“:0 ,"status":0 ,"statusText" :"error" while Call api through AjaxCall Realsed Apk android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58725134/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com