I am using alfresco Remote API to perform a post call to a JavaScript based WebScript.
As alfresco shows in documentation , postcall should be:
var connector = remote.connect(ENDPOINT_ID);
connector.post(uri, body)—POSTs content to the given URI
My code is to perform post is:
var connector = remote.connect("alfresco");
var JSONString = connector.post("/procesador-documentos",dataObj: {
"metod": "test",
});
My code to receive the post call is:
if(requestbody.content ){
aux = JSON.parse(requestbody.content);
metod = aux.metod;
}
I have tried several options to retrieve body content but I am not able to do it.
EDIT: My webscript is executed properly and works fine.
The problem is the variable requestbody.content doesnt have content but if i do
logger.log(requestbody.content);//prints blank
if(requestbody.content ){}//evaluated to true
How should I retrieve that information?
I think that will work with
eval