public static void main(String[] args) {
// TODO Auto-generated method stub
Client c = Client.create();
WebResource r=c.resource("http://10.1.41.252:8080/workflowController/service/todo/stat");
MultivaluedMap formData = new MultivaluedMapImpl();
formData.add("data", "ST/G001000001612549");
String response = r.type("application/x-www-form-urlencoded")
.post(String.class, formData);
System.out.println(response.toString());
}
使用jersey客户端访问rest接口
最新推荐文章于 2021-02-24 03:10:48 发布