As the Language Reference says:
When using the optional Timeout parameter of the Get, GetHeaders,
or Post methods the page will be received or posted in a
synchronous manner. That is, REALbasic will wait until the page has
been received or posted before it proceeds.
That means that the synchronous version of Post returns a value - a
string which contains the contents of the returned page. The
PageReceived event does not fire; the content is simply returned from
the call to POST. If you want your app to remain responsive while
this is going on, you can set the Yield property of the socket to true.
So, try something like this:
s = theSocket.Post(theURL,theTimeout)
Also, note that the timeout value is in seconds, not milliseconds.
--Peter
On Jun 2, 2006, at 9:19 AM, Daniel Chiaramello wrote:
Your simple sample does not compile (RB2006r2):
"This method requires fewer parameters than were passed."
That's my problem :)
----- Original Message ----- From: "Giles Williams"
<[EMAIL PROTECTED]>
To: "REALbasic NUG" <[email protected]>
Sent: Friday, June 02, 2006 6:07 PM
Subject: Re: HTTPSocket, POST and timeout...
You just type it exactly as the Documentation shows it.
EG:
Dim ht As New HTTPSocket
ht.Post( "http://www.yoururl.com/", 6000 )
That posts the file "http://www.yoururl.com/" with a time out of
6 seconds.
On 2 Jun 2006, at 16:51, Daniel Chiaramello wrote:
Hi all.
Well, I have a problem with the Post method of HTTPSocket and
setting a timeout.
In documentation, the syntax is the following one:
HTTPSocket.Post URL, [File], [Timeout]
But I don't seem to be able to set the timeout!!!
The HelpTag tells that only one version exists: HTTP.Post (url
as String)
I really need to set a bigger timeout than the default one,
because the handling of data *is* longer than 30 seconds! How
can I do that???
Thanks for your attention,
Daniel Chiaramello,
MadWaves
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>