As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
HttpClient client = new HttpClient(); PostMethod method = new PostMethod("http://IP/alfresco/service/mywebscript"); method.setQueryString(new NameValuePair[] { new NameValuePair("name", "George") });
JSONObject data = new JSONObject(); data.put("test", "this is a test"); method.setRequestEntity(new StringRequestEntity(data.toString(), "application/json", "UTF-8"));
setParameter("Connection", "Keep-Alive");