Page 1 of 1
REST service callback when finished
Posted: Thu Dec 26, 2013 11:38 am
by Ivan6481911
Hello. I want to get callback from REST service, which download multiple audio files asynchronously by FileTransfer. I have XML file and I go though each object, get link and start downloading file.
Events "Success" and "Complete" are called too fast (when code is done, but files are still downloading). Would you please give appropriate solution to resolve task.
Perhaps, it has to be number of objects in XML which I will be decrementing... How to get it? Or some other solution.
Thanks!
REST service callback when finished
Posted: Thu Dec 26, 2013 1:52 pm
by Maryna Brodina
Hello! Here is how to count number of elements in response https://getsatisfaction.com/apperyio/... or just increment variable value in mapping for each component.
You can add delay before complete function is invoked using setInterval https://developer.mozilla.org/en-US/d...
REST service callback when finished
Posted: Fri Dec 27, 2013 10:09 am
by Ivan6481911
REST service callback when finished
Posted: Fri Jul 11, 2014 1:48 pm
by Himanshu
How can I get the number of counts in "Complete" event?
REST service callback when finished
Posted: Fri Jul 11, 2014 5:24 pm
by Evgene Karachevtsev
Hello Himanshu,
Could you please provide us with more information about your question?
REST service callback when finished
Posted: Mon Jul 14, 2014 5:11 am
by Himanshu
Hi Evgene.. Actually I have a list to show on the page, And based on the list I am showing/hiding a div on that page. But because the list is huge....30-40 lines, and If I do Show/hide in Success event, then it don't show full list, but only some lines. So I am thinking to do it in Complete event, instead of success. And so I need number of items in complete event.. to show/hide that div.
REST service callback when finished
Posted: Mon Jul 14, 2014 5:19 pm
by Kateryna Grynko
Hi Himanshu,
You can obtain all service response on Success event (it is in variable 'data') or process list records one by one using JS code for list item mapping.