Hi everyone, thanks for taking the time to read this. I'm trying to build a class that acts like Communications.makeWebRequest, but can automatically retry the Comm requests if they fail. The retry would be an exponential retry, so the app would retry the Comm request after 0, 2, 4, 8, 16, 32, 64, 128 seconds, etc. The problem is that I'm not super familiar with the attributes of a class, so I'm not sure how to build this correctly.
The problem comes when I run multiple web requests in a row. For example, if I send a request to website1.com, then another to website2.com, how does my program keep the data for website1 (url, params, options) separate from website2's data? How would a timer trigger an update of the class, where each Web Request is evaluated, and the ones that are ready to be retried are retried?
Just thinking out loud, could a class-wide dictionary store the requests, and then iterate through them ever time the timer is triggered? Or is there some better way to do this?
Thanks for the help!!
Lance