httpclient HTTPPost

阅读更多
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#)