当前位置:编程学习 > JAVA >>

Httpclient 高手进

HttpPost httpost1 = new HttpPost(
"http://bbs.rxjhbaby.com/forum.php?mod=viewthread&tid=135440&extra=page%3D1");
List<NameValuePair> nvps1 = new ArrayList<NameValuePair>();
nvps1.add(new BasicNameValuePair("addfeed", "1"));
nvps1.add(new BasicNameValuePair("usesig", "0"));
nvps1.add(new BasicNameValuePair("formhash", "3e090e74"));//如何动态获得formhash
nvps1.add(new BasicNameValuePair("subject", ""));
nvps1.add(new BasicNameValuePair("message", "此信息由程序自动发送"));
httpost1.setEntity(new UrlEncodedFormEntity(nvps1, HTTP.UTF_8));
HttpResponse response1;
response1 = httpclient.execute(httpost1);
HttpEntity entity1 = response1.getEntity();
--------------------编程问答-------------------- 如何动态获得formhash?
--------------------编程问答-------------------- 我发现现在的提问者们越来越想考验我们答题者的猜想能力了!
补充:Java ,  Web 开发
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,