Previous request not completed

J. Landman Gay jacque at hyperactivesw.com
Wed Oct 13 16:54:10 EDT 2021


Thanks Charles. I forgot about using TSNet by itself, mostly because the various commands are 
beyond my skill level. You actually have to know what you're doing for that.

In the process of revising my scripts, the duplicate requests that were causing the problem 
seem to have disappeared. I settled for a short wait regardless. So far, so good.

On 10/12/21 1:42 AM, Charles Warwick via use-livecode wrote:
> You can use tsNet without libURL by using tsNet functions (tsNetGet, tsNetPost, ...) rather than the libURL syntax (get URL, put URL, ...).
> 
> tsNet includes a libURL wrapper so that if you choose to use libURL commands and tsNet is included then libURL will perform the requests using tsNet instead of its own internal methods.  However, you are also free to not include libURL and just use tsNet by itself.
> 
> Whether you are using tsNet or libUrl, you can get the "previous request not completed" error if you are not using pro features and you are performing synchronous transfers.  The "non-pro" version of tsNet acts the same as libURL by only allowing one synchronous request at a time (the pro version of tsNet allows multiple synchronous requests at the same time).
> 
> In order to fix this, you can use tsNet's asynchronous commands (e.g.  tsNetGet instead of tsNetGetSync, tsNetPost instead of tsNetPostSync, ...) or libURL's "load URL" command.  The "load URL" command only support HTTP GET requests which means that if you need to use other types of requests (e.g. POST) then use the tsNet functions directly.
> 
> The tsNetLibUrlReuseConnection command is used to control whether or not your application will try to re-use an open connection to perform another request against the same server or whether it will open a completely new connection each time.  You will still experience the "previous request not completed" if you try to make two synchronous requests against the same server at the same time regardless of this setting.


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list