HTTPTimeout

Got an idea for enhancing SpiderBasic? New command(s) you'd like to see?
hoerbie
Posts: 100
Joined: Sun Mar 17, 2019 5:51 pm
Location: DE/BY/MUC

HTTPTimeout

Post by hoerbie »

Hi,
as PB now has the awaited feature to set a timeout for the http requests, I think this could be useful in SB too.
Until now I use something like the following to set a timeout in milliseconds:

Code: Select all

Procedure HTTPTimeout(msec.i)
  ! $.ajaxSetup({ timeout: v_msec });
EndProcedure
But this only seems to work for HTTPRequest but not for the Load*() commands...
Greetings from hoerbie
Fred
Site Admin
Posts: 1506
Joined: Mon Feb 24, 2014 10:51 am

Re: HTTPTimeout

Post by Fred »

Makes sense, I will add it. For Load*() an optional param will be probably enough.
hoerbie
Posts: 100
Joined: Sun Mar 17, 2019 5:51 pm
Location: DE/BY/MUC

Re: HTTPTimeout

Post by hoerbie »

@Fred: sounds good :)
When you add it, maybe you can add it more the same way like in PB, that HTTPTimeout sets a variable in the background and this variable is then read when a new HTTPRequest() is called, and then set directly for the next $.ajax call.
Because I think my way of using $.ajaxsetup could be problematic when doing multiple faster and slower calls in the same time and setting a short timeout as default while a slow request is done, to not get problems, until now m only using one HTTPRequest() or Load*() at the same time.

When adding a timeout to the Load*() functions an optional param would be OK.
Post Reply