【问题标题】:android posturl https安卓posturl https
【发布时间】:2011-12-11 09:56:12
【问题描述】:

您好,我需要使用此方法,但出现白屏。如果我使用 http 而不是 https 它可以正常工作,但是为什么呢?我需要 https :(

%%%%%% 工作 %%%%%%

String postData = "username=user&password=pass";
String url = "http://www.ilias.de/docu/login.php";
webView.postUrl(url, EncodingUtils.getBytes(postData, "base64"));

%%%%% 不工作

String postData = "username=user&password=pass";
String url = "https://www.ilias.de/docu/login.php";
webView.postUrl(url, EncodingUtils.getBytes(postData, "base64"));

【问题讨论】:

  • 很好的问题——很好的答案。

标签: android post https webview


【解决方案1】:

您查看过这个tutorial 的答案了吗?

【讨论】:

  • 我知道,我已经完成了选项 b) 将网站证书添加到本地密钥库,如何在 postUrl 中使用它?
  • 好的,我已经解决了 engine = (WebView) findViewById(R.id.my_webview); engine.setWebViewClient(new WebViewClient() { public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) { handler.proceed() ; } } 但我认为只适用于 froyo :(
猜你喜欢
  • 2012-10-20
  • 2010-11-02
  • 1970-01-01
  • 1970-01-01
  • 2015-03-19
  • 2011-07-29
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多