[Gambas-user] App hangs when using httpclient download

Bruce Steers bsteers4 at gmail.com
Wed Oct 11 00:17:55 CEST 2023


Try not instantiating an object, just  ...

dara = httpclient.Download("theurl")

I think Download() is not async anyway and meant to be a static method,
those object flags you're using are more relevant to downloading via a
process handler using "get" methods, etc.


Respects
BruceS



On Tue, 10 Oct 2023, 21:46 Brian G, <brian at westwoodsvcs.com> wrote:

> I don't know if I am doing something wrong, I don't remember it being a
> problem in past but
>
> When using the httpclient the app hangs at exit
>
> as example
>
> dim hclient as new httpclient
> hclient.async = false
>
> dim data as string
> data = hclient.download("theurl")
> print data
> hclient.close()
> hclient = null
>
>
> The app never exits just hangs
>
>
>
> "Failure is the key to success;
>  each mistake teaches us something"  .. Morihei Ueshiba
> Brian G
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231010/4803c6e4/attachment-0001.htm>


More information about the User mailing list