My code so far:
FileReader fileReader = new FileReader("filename.xml");
Client c = Client.create();
WebResource webResource = c.resource("http://localhost:8080/api/resource");
webResource.type("application/xml");
I want to send contents of filename.xml with POST method but I have no idea how to add them to the body of request. I need help as in the net I was only able to find how to add Form args.
Thanks in advance.
You can always use the java.net APIs in Java SE: