[Gambas-user] HttpClient

Mark Carter mcturra2000 at ...370...
Sun Jun 17 16:47:57 CEST 2007

I'm using Gambas 1.0.15 on Ubuntu. HttpClient doesn't have the Async or Timeout property. Do I need to upgrade?

----- Original Message ----
From: Daniel Campos <dcamposf at ...626...>
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Sent: Sunday, 17 June, 2007 3:19:46 PM
Subject: Re: [Gambas-user] HttpClient

> > I'm wondering how to use HttpClient. I've written a function:
> >
> > PUBLIC SUB blah()

HttpClient is asynchronous by default, so trying to read from the
buffer after doing Get() has no sense (HTTP communications can delay
some seconds in WAN). So, you have two options:

1) Wait for the Read event to get pieces of information as they arrive
to the local system.

2) Put the "Async" property set to FALSE prior to Get(), that way
Get() will stop the program flow until all the information is
received. In that case you should use also the "TimeOut" property to
set a timeout, if not, it could hang forvever if the server does not
reply properly.


This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
Gambas-user mailing list
Gambas-user at lists.sourceforge.net

Yahoo! Answers - Got a question? Someone out there knows the answer. Try it

More information about the User mailing list