从httpcomponent调用获取Curl

时间:2014-11-05 12:14:25

标签: curl apache-httpcomponents

谁知道如何从httpComponent调用curl?

 CloseableHttpClient httpclient = HttpClients.createDefault();
 URIBuilder builder = new URIBuilder();
 builder.setScheme("http").setHost("localhost:8080/AppDev")
 .setPath("/rest/user/authenticate/")
 .setParameter("username", "joe")
 .setParameter("password", "123456");
 URI uri = builder.build();
 HttpPost httppost = new HttpPost(uri);
 CloseableHttpResponse response = httpclient.execute(httppost);

我希望从执行中得到卷曲。

一些建议?

0 个答案:

没有答案