[Gambas-user] HttpClient question

Ron ron at ...1740...
Wed Mar 30 18:06:06 CEST 2011


I got a curl pipe error, and sent you my test project privately in a sec.
So you can test with my user account.

Regards,
Ron.

2011/3/30 Benoît Minisini <gambas at ...1...>:
>> It seems that if you call HttpClient twice after each other with
>> different urls in async mode, like in example below the _finished event
>> is only called once (with the last call/url)
>>
>> So they are not really async/background, or is this a bug?
>> Or are they overwritten, due to false usage/code?
>>
>> This happens in Gambas2 and 3...
>>
>> ' Gambas module
>>
>> Public hPachubeFetch As HttpClient
>>
>> Public Sub Main()
>>
>>    Dim rFeeds As String[] = ["21017", "3711"]
>>    Dim sUrl, sFeed As String
>>
>>    For Each sFeed In rFeeds
>>      Debug sfeed
>>      hPachubeFetch = New HttpClient As "hPachubeFetch"
>>      hPachubeFetch.URL = sUrl
>>      hPachubeFetch.TimeOut = 8
>>      hPachubeFetch.Tag = sFeed & "|0|12" ' feed | datastream | device id
>>      hPachubeFetch.Auth = 1
>>      hPachubeFetch.User = "user"
>>      hPachubeFetch.Password = "password"
>>      hPachubeFetch.Async = True
>>      hPachubeFetch.Get()
>>   Next
>>
>> End
>>
>> Public Sub hPachubeFetch_Finished()
>>
>>     'do stuff
>>
>> End
>>
>> Regards,
>> Ron_2nd.
>>
>
> Hi,
>
> In revision #3708, I have committed a change so that asynchronous HttpClient
> object are automatically kept alive until they are finished.
>
> So that previous code should work as expected now. Can you test that for me
> please?
>
> Thanks in advance.
>
> Regards,
>
> --
> Benoît Minisini
>
> ------------------------------------------------------------------------------
> Create and publish websites with WebMatrix
> Use the most popular FREE web apps or write code yourself;
> WebMatrix provides all the features you need to develop and
> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list