httpclient HTTPPost
程序员文章站
2022-07-05 09:35:16
...
File songFile = new File("F:\\pcsearcher\\bcount\\bcounts0812\\bcount2.xml");
FileEntity entity = new FileEntity(songFile, "text/xml; charset=\"UTF-8\"");
//download listening
HttpPost post = new HttpPost("http://localhost/searcher/bcountServlet?type=listening");
post.setEntity(entity);
HttpClient httpclient = new DefaultHttpClient();
HttpResponse response = httpclient.execute(post);
FileEntity entity = new FileEntity(songFile, "text/xml; charset=\"UTF-8\"");
//download listening
HttpPost post = new HttpPost("http://localhost/searcher/bcountServlet?type=listening");
post.setEntity(entity);
HttpClient httpclient = new DefaultHttpClient();
HttpResponse response = httpclient.execute(post);
上一篇: mencoder使用
下一篇: [zz]Big Data技术综述
推荐阅读
-
通过HttpClient 调用ASP.NET Web API示例
-
jsp 中HttpClient中的POST方法实例详解
-
Spring中@Scheduled和HttpClient的连环坑
-
php实现httpclient类示例
-
Android 中HttpURLConnection与HttpClient使用的简单实例
-
Android下通过httpClient发送GET和POST请求的实例代码
-
HttpClient Post 二进制/字节流/byte[]实例代码
-
C# HttpClient Cookie验证解决方法
-
那些年用httpclient时踩过的一些坑
-
JSP开发中Apache-HTTPClient 用户验证的实例详解