07-23-2013 04:21 AM
{"org":{"alfresco":{"share":{"documents":{"favourites":""}}}}}
http://localhost:8080/share/proxy/alfresco/api/people/USERNAME/preferences
var simplehttpresult = "no result";
var xmlhttpresult = "no result";
var error = "no error";
// try calling the web script a couple different ways
try {
//call the web service using SimpleHttpConnection
simplehttpresult = SimpleHttpConnection
.getContentAsString("http://localhost:8080/share/proxy/alfresco/api/people/usernametest/preferences");
//call the web service synchronously via XMLHttpRequest
XMLHttpRequest
.open("POST", "http://localhost:8080/share/proxy/alfresco/api/people/usernametest/preferences",
false, "user", "pass");
XMLHttpRequest.setRequestHeader("Host", "localhost:8080");
XMLHttpRequest.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
XMLHttpRequest.setRequestHeader("Cookie", "_alfTest=_alfTest; JSESSIONID=72F1A690CC001AF5080B86854CA10542; alfLogin=1374511322; alfUsername3=admin");
XMLHttpRequest.send("{\"org\":{\"alfresco\":{\"share\":{\"documents\":{\"favourites\":\"\"}}}}}");
xmlhttpresult = XMLHttpRequest.getResponseText();
XMLHttpRequest.close();
}catch(ex){error = String(ex)}
07-24-2013 03:09 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.