[Gambas-user] HttpClient

Mark Carter mcturra2000 at ...370...
Sun Jun 17 19:27:39 CEST 2007


Cheers. I've managed to get stuff to work. I'd like to document it at the wiki, and have sent a request to the Gambas wiki for this purpose.

----- 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.

Daniel

-------------------------------------------------------------------------
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.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user







      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 


More information about the User mailing list