Nativescript Vue onReceivedSslError

时间:2019-03-06 18:52:34

标签: nativescript

在Nativescript Vue中,我需要能够忽略Web视图中的ssl错误。我已经找到了描述here的解决方案,但是它是用Typescript编写的,我不知道如何在Nativescript Vue中实现它。在本机Java中,它看起来像这样:

    // SSL Error Tolerant Web View Client
private class SSLTolerentWebViewClient extends WebViewClient {

            @Override
            public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
                handler.proceed(); // Ignore SSL certificate errors
            }

}

有人知道如何在nativescript vue中做到这一点吗?

0 个答案:

没有答案