Jenkins api java 调用

        String filepath = "E:\config.xml";
        HttpClient client = new DefaultHttpClient();
        HttpPost post = new HttpPost("http://localhost:8080/createItem?name=33333333333");
        post.setHeader("Content-Type", "text/xml");
        FileEntity entity = new FileEntity(new File(filepath));
        post.setEntity(entity);
        HttpResponse response = client.execute(post);
原文地址:https://www.cnblogs.com/rubekid/p/4761997.html