RestClient c = new RestClientImpl(new HttpClient());
RestRequest req = new RestRequest();
req.setBody("name=n&data=d1");
req.setResource("/resources/");
req.setMethod(Method.Post);
req.addHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
RestResponse res = c.execute("http://localhost:8765", req);
System.out.println("=======>\n" + res + "\n<=======");
}
public static void postXml(String[] args) {