How to use HttpClient using Post method?
How to开发者_开发知识库 use HttpClient using Post method ?
See a docs on DefaultHttpClient class and HttpPost class
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("http://your.site/your/service");
// set some headers if needed
post.addHeader(....);
// and an eclosed entity to send
post.setEntity(....);
// send a request and get response (if needed)
InputStream responseStream = client.execute(post).getEntity().getContent();
here you can get an good example Executing a HTTP POST Request with HttpClient
精彩评论