I have developed a webscript in alfresco:
/settaskstatus?taskID=491389&status=Completed
which sets status of a task based on it's ID.
I am trying to call this web script upon click of a button in ruby(erb)
<%=button_to "Completed", "https://plxcas140.pdx.intel.com:8443/alfresco/service/settaskstatus?taskID=491389&status=Completed"%>
It shows the following error:
That means the webscript you created is not able to deal with the POST method.
Much probably you have only the GET method.
Can you share here the webscript's code?
Remember to share everything you have (xml, ftl, js, java, whatever)
Hello,
I changed the name of my script from settaskstatus.get.js to settaskstatus.post.js and then the button worked.
Can you explain the reason behind it and what if I want to call a GET request
You can find all the explanation in the official docs here Web scripts | Alfresco Documentation
Now, short answer to you "what if I want to call a GET request", in that case you have to configure Ruby to use the GET method instead of the POST, but for that, I have nothing to say, as I know nothing about Ruby.
It seems, by your sample code, that Ruby uses POST as default.
okay thanks
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.