ADF Call Post webscript
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2018 09:01 AM
I am trying to get datalist value in my adf application and i can use GETmethod properly but at one place i need to call POST method so how can i call post method with body?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2018 09:50 AM
Hi as from documentation that you can find in the alfresco-js-api repository:
you need to change the input parameters.
executeWebScript(httpMethod, scriptPath, scriptArgs, contextRoot, servicePath, postBody)
The first httpMethod as to be 'POST'
The last parameter the postBody.
So in your case for example:
this.alfrescoJsApi.core.webscriptApi.executeWebScript('POST', 'slingshot/datalists/data/node/workspace/SpacesStore/ce744915-6130-40b8-9c57-6b7c442f656f',null, null, nul, postBody )

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2021 09:48 PM
Hi Guys,
The webscript api is marked as deprecated. Can anyone comment on what should be used in its place if you want to call a custom webscript?
Regards
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2018 04:57 AM
import { AlfrescoApiService } from '@alfresco/adf-core';declare it in constructor like follows
constructor(private apiService: AlfrescoApiService)and can call any post method as followsthis.apiService.getInstance().webScript.executeWebScript(
'POST',
'/variables',
null,
null,
'api/-default-/public/workflow/versions/1/tasks',
JSON.stringify(this.commentBody)
).then(
(response: any) => {}
);
