Not a bug, but a less than clear bit of documentation, I think.

If you do a synchronous get (i.e., by specifying the optional integer timeout parameter), then the method will return a value so you meed to assign it to something. If you do not specify a folder item, then the returned value is a string, and contains the contents of the page. If, however, you do pass a folderitem AND the synchronous timeout value, then it returns a boolean.

So, you can do it asynchronously:

h.get(url,f)

and handle the folderItem in the socket's dowmloadCompleted event, or you can specify a synchronous get to be rturned as a string:

s = h.get(url,t)

or, you can pass both a folder item and a timeout, and assign to a boolean

b = h.get(url,f,t)

(where h is the socket, s is a string, t is an integer, and b is a boolean).


On Mar 27, 2006, at 8:30 PM, Brian wrote:

Okay this is weird
it says in the language ref that httpsocket.get can take three parameters
url string, folderitem, integer
but when i use all three it says
requires fewer parameters than were passed

if i put
http.get (str)
it runs fine

but if i put
http.Get (str, fldritem, int)
it wont compile

it was working fine yesterday
now its all screwed and nothing has been changed
ive noticed this before where unchanged code will just stop working
freakin bug or sumthin

anyone have any idea?

i need the httpsocket to download to a file and use synchronous mode


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

Reply via email to