【发布时间】:2016-08-04 05:33:20
【问题描述】:
我正在尝试在 WebView 中获取请求的 POST 响应。这是我的代码。
mWebview.setWebViewClient(new WebViewClient() {
@Override
public WebResourceResponse shouldInterceptRequest (final WebView view, String url) {
WebResourceResponse w = super.shouldInterceptRequest(view, url);
Log.i("type", w.getMimeType());
return super.shouldInterceptRequest(view, url);
}
});
但是程序崩溃了,错误是 w 为空。谁能告诉我为什么会这样或给我任何解决方案以在 WebView 中获取请求的 POST 响应?
谢谢。
【问题讨论】:
-
你有没有为此找到解决方案?
-
没关系,找到答案了。
标签: android http post webview response