HTML post to Alfresco Webservice

46 Views Asked by At

I have been trying to post from a HTML dashlet to a Java based web-service but the content is always null. I have tried posting with postman setting various properties etc. I have been able to get a response as a result of the post but using the debugger I can see that the content is null! I have tried many versions of a DeclarativeWebScript or a AbstractWebScript in both cases I have used many options for the post type but always the content received is null! I have looked for an example but can find only ones that post a file which is not what I want to post. Any pointers gratefully received.

1

There are 1 best solutions below

0
Vikash Patel On

If you are submitting html form with post request directly then it will look for the action url in share environment or in share side,

So it is better to use ajax for get or post request to your alfresco repository

Refer this ajax documentation for repo webscript call.

Refer this documentation for your to get/post parameters which you will send in your html get/post request, you can send your response data.