09-14-2012 12:08 AM
09-14-2012 02:36 AM
09-15-2012 04:38 AM
public static void main(String[] args) throws Exception {
DefaultHttpClient httpclient = new DefaultHttpClient();
try {
httpclient.getCredentialsProvider().setCredentials(
AuthScope.ANY,
new UsernamePasswordCredentials("kermit", "kermit"));
HttpGet httpget = new HttpGet("http://localhost:8080/activiti-rest/service/process-engine");
System.out.println("executing request" + httpget.getRequestLine());
HttpResponse response = httpclient.execute(httpget);
HttpEntity entity = response.getEntity();
System.out.println("—————————————-");
System.out.println(response.getStatusLine());
if (entity != null) {
System.out.println("Response content length: " + entity.getContentLength());
}
EntityUtils.consume(entity);
} finally {
// When HttpClient instance is no longer needed,
// shut down the connection manager to ensure
// immediate deallocation of all system resources
httpclient.getConnectionManager().shutdown();
}
}09-15-2012 05:06 AM
09-15-2012 10:48 PM
09-16-2012 04:36 AM
DefaultHttpClient httpclient = new DefaultHttpClient();
try {
HttpGet httpget = new HttpGet("http://localhost:8080/activiti-rest/service/tasks?assignee=kermit");
UsernamePasswordCredentials creds = new UsernamePasswordCredentials("kermit", "kermit");
httpget.addHeader(new BasicScheme().authenticate(creds, httpget));
System.out.println("executing request" + httpget.getRequestLine());
HttpResponse response = httpclient.execute(httpget);
…..
09-17-2012 11:05 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.