【发布时间】:2012-11-19 10:53:21
【问题描述】:
我想使用 webview 发出一个 http post 请求。
webView.setWebViewClient(new WebViewClient(){
public void onPageStarted(WebView view, String url,
Bitmap favicon) {
super.onPageStarted(view, url, favicon);
}
public boolean shouldOverrideUrlLoading(WebView view,
String url) {
webView.postUrl(Base_Url, postData.getBytes());
return true;
}
});
上面的代码 sn -p 加载网页。我想访问此请求的响应。
如何使用 webview 获取 http post 请求的响应?
提前致谢
【问题讨论】:
-
在这种情况下,webView 没有任何作用,webView 只是让您的网页显示在 android 小工具中,现在由您在服务器站点上处理您网站中的请求响应,我建议您使用 HTTPPOST 调用来获取响应
-
您的问题是:如何使用网页视图发出帖子请求?比您问的详细信息:如何使用 Web 视图获取 http post 请求的响应?那么你真正的问题是什么?因此我投了反对票。
标签: android webview http-post response