这是使用HttpClient 4.2及更高版本添加查询字符串参数的方法:
URIBuilder builder = new URIBuilder("http://example.com/");builder.setParameter("parts", "all").setParameter("action", "finish");HttpPost post = new HttpPost(builder.build());结果URI看起来像:
http://example.com/?parts=all&action=finish



