10-26-2009 11:50 AM
var sUrl = "/alfresco/service/api/forum/node/workspace/SpacesStore/c128f4c1-22f2-4d74-a924-a6a2dcf731fd/posts";
var data = '{"title": "This is the title", "content": "This is my post content"}';
var postData = YAHOO.lang.JSON.stringify(data);
var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
"status" : { "code" : 500, "name" : "Internal Error", "description" : "An error inside the HTTP server which prevented it from fulfilling the request." }, "message" : "09261343 Wrapped Exception (with status template): 09261342 Error during processing of the template 'Error executing macro: postJSON\nrequired parameter: postData is not specified.'. Please contact your system administrator.", "exception" : "org.alfresco.web.scripts.WebScriptException - 09261343 Wrapped Exception (with status template): 09261342 Error during processing of the template 'Error executing macro: postJSON\nrequired parameter: postData is not specified.'. Please contact your system administrator.", "callstack" : [ "" ,"freemarker.template.TemplateException: Error executing macro: postJSON\nrequired parameter: postData is not specified." …
11-01-2009 11:15 PM
curl -v -X POST "http://localhost:8080/alfreso/service/api/forum/node/workspace/SpacesStore/fbd4e50e-04e7-4e52-8280-9..." -H "Content-Type: application/json" -d @/Users/jpotts/tmp.json
Can you try again but this time, include the following line just before your post:YAHOO.util.Connect.initHeader("Content-Type", "application/json");
Hope that helps,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.