AnsweredAssumed Answered

POST webscript

Question asked by zladuric on May 22, 2010
Hello,

I have a question about POST webscripts and sending parameters from share. I tried searching the forums and wiki, but couldn't find any useful information.
What I have is a POST webscript and a share dashlet.
The share dashlet has a regular form, and I tried the following:
var poststr = "new=" + newID
                   + "&partnerid=TESTTEST" + encodeURI( partnerid.value )
                   + "&number=" + encodeURI( number.value )
Then I passed it as http.setRequestHeader("Content-type", "application/x-www-form-urlencoded") but I can't locate it on the repository side, neither in "args" or "formdata".
I also tried sending it as a JSON with http.setRequestHeader("Content-type", "multipart/formdata") but in the webscript it's still not in any arguments I know of.
Can somebody post an example of how to do a javascript POST request to an alfresco post webscript? I just don't know how to pass the parameter and how to reach it on the other end.

Thanks in advance!

Outcomes