nageswaragunupudi wrote:Thank you.
GETURLTOFILE() is working with http: but not https:
This is not true. It would work if tipssl were linked (and opensll DLL's were available).
nageswaragunupudi wrote:URLDOWNLOADTOFILE() is working well with all and is also much faster than GETURLTOFILE().
I was not aware the URLDOWNLOADTOFILE() is much faster than GETURLTOFILE(). Are you made any real test? Can you share the timing result?
nageswaragunupudi wrote:The actual reason for my testing is to find a faster alternative to the existing function WebPageContents(). Our requirement is to directly read the contents of the URL into memory.
I use this (but it needs opensll as well):
- Code: Select all Expand view RUN
- FUNCTION GETURL( cUrl )
LOCAL cHtm := ""
LOCAL oCli
TRY
oCli = TIPClientHttp():New( cUrl )
IF EMPTY( oCli ) THEN BREAK
oCli:nConnTimeout = -1
IF !oCli:Open() THEN BREAK
cHtm = oCli:ReadAll()
IF EMPTY( oCli:cReply ) .OR. !( "OK" $ UPPER( oCli:cReply ) )
cHtm = ""
ENDIF
CATCH
END
IF !EMPTY( oCli ) THEN oCli:Close()
RETURN cHtm
EMG