Nickelgrass Active Member Licensed User Longtime User Oct 6, 2012 #1 Hi! I have an app with one httpclient. In different subs I execute several httprequests. It seems that these requests are not actually finished in the order they were launched. That is basically not a problem. But: My question is if there is any way to find out if all http requests from my httpclient have finished. Thanks! Regards!
Hi! I have an app with one httpclient. In different subs I execute several httprequests. It seems that these requests are not actually finished in the order they were launched. That is basically not a problem. But: My question is if there is any way to find out if all http requests from my httpclient have finished. Thanks! Regards!
stefanobusetto Active Member Licensed User Longtime User Oct 6, 2012 #2 you can assign each request a different id then in the request success/error event you know which are completed (and which not) Upvote 0
you can assign each request a different id then in the request success/error event you know which are completed (and which not)
Nickelgrass Active Member Licensed User Longtime User Oct 6, 2012 #3 Hi, thanks for the reply. I know how to use the httpclient. My question is if there is a posibility to find out if all requests have finished. I could not find a httpclient.finished or something similar. The sucsess/error event doesnt tell me when all requests have finished. Upvote 0
Hi, thanks for the reply. I know how to use the httpclient. My question is if there is a posibility to find out if all requests have finished. I could not find a httpclient.finished or something similar. The sucsess/error event doesnt tell me when all requests have finished.
stefanobusetto Active Member Licensed User Longtime User Oct 6, 2012 #4 no as far as i know i had the same problem so i wrote some sort of class to launch a list of request each starting when the previous finishes Upvote 0
no as far as i know i had the same problem so i wrote some sort of class to launch a list of request each starting when the previous finishes
Nickelgrass Active Member Licensed User Longtime User Oct 6, 2012 #5 Ok, I understand. I will do it like that. Thanks! Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 7, 2012 #6 I recommend you to use HttpUtils2 instead of HttpClient directly. You can modify HttpJob and add a NextJob field which will hold the next job. In JobDone you should check whether NextJob is initialized. If yes then download the next request. Otherwise it was the last job. Upvote 0
I recommend you to use HttpUtils2 instead of HttpClient directly. You can modify HttpJob and add a NextJob field which will hold the next job. In JobDone you should check whether NextJob is initialized. If yes then download the next request. Otherwise it was the last job.