Can I do two get requests in the same script with the Base Elements plugin? Each request works fine on there own but once I add them one after the other in the same script the second doesn't return.
If you use other BE functions for option or authentication or header before GET, try repeating them for each request.
Do you need to "pause" (briefly) between?
I think beverly is very likely to be correct.
In one of my solutions, I use insert from URL to do an API call and then I use a loop that checks the target field (of the insert) for data and don't exit the loop until either data has appeared in that field or a counter counts up to a large number (to function as a time out since the other web service could conceivably just fail to respond). I then can do the next API call unless the first timed out on me or I get an error result back from the first.
I have tried with a 5-second delay between requests still no luck.
Can you post the requests (obscure sensitive data)?
What result text are you getting in your variables? Is there an error code or message of some type appearing in them?
If I comment them out individual, they will both return correct json data no errors. If I run them together the first will give the correct response json data and the second variable will just be empty with no errors almost as if the function isn't running.
I also have the same issue if I try a post request later in the script.
Is is a limitation of the API you are calling? (you can only call the same URL one is "X" hours?
500 requetsr every 5 mins so shoishbe fine. Plus like I said if I comment them out individually they both run fine.
can they be combined into ONE request?
Ideally I'd like it in two if I can get it to work.
Did you put pause between the requests. If the same address makes a call before the first on has finished it is likely the server will ignore it
I have tried with a 5 second pause.
Try a bit longer. Start for example with a minute and then if that works half the pause until you get to the optimum pause.
I cant see a reason why you can’t have multiple calls in a script. In case though, did you try putting them each in their own script then call the scripts instead?
Thank you user19752 DonCollier philmodjunk beverly. Re-Authenticating seems to be the issue. Thought that might have something to do with it but thought rather it would throw an unauthorized error rather than nothing at all.
Retrieving data ...