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);

 

相关文章:

  • 2022-12-23
  • 2021-12-05
  • 2021-11-26
  • 2022-01-31
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
猜你喜欢
  • 2022-12-23
  • 2022-02-07
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
相关资源
相似解决方案