欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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);
相关标签: XML F#