AnsweredAssumed Answered

Getting POST parameters for a JavaScript webscript

Question asked by patorjk on Sep 29, 2011
Latest reply on Nov 15, 2011 by zladuric
For webscripts written in JavaScript, I'm able to get parameters in the query string via the "args" object. However, after looking over the object list in Chapter 9 of "Professional Alfresco", looking through the wiki, playing around a bit, and searching the web, I seem to be unable to find a way to get POST parameters (parameters passed in the HTTP message's body). Is there a way to access these parameters from a webscript?

As an example, here is how I'm passing the variables to the webscript from client side (this is for a Share dashlet that's talking to the repository):

var sUrl = Alfresco.constants.PROXY_URI + "folder-search";
var postData = "searchTxt=" + document.getElementById("jtf_text").value;
var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);