Jersey REST Client: How to add XML file to the body of POST request?

前端 未结 2 725
面向向阳花
面向向阳花 2021-01-21 09:14

My code so far:

FileReader fileReader = new FileReader(\"filename.xml\");
Client c = Client.create();
WebResource webResource = c.resource(\"http://localhost:808         


        
2条回答
  •  日久生厌
    2021-01-21 09:41

    Have a look at the Jersey API for WebResource. It gives you a post method that accepts data.

提交回复
热议问题