Enrico Maria Giordano wrote:Sure, but I need a simple PRG showing the errors that I can test here.
Code below, I change testget in samples folder to try tipclient with https. Thanks in advance!
#Include "Fivewin.ch"
Function Main()
LOCAL oDlg, oGet
LOCAL cCad := "Testing " // pad("Testing Gets",40)
LOCAL nNum := 0
LOCAL dDat := Date()
Set Century on
Set Date To British
Set Epoch to 1960
Set Multiple On
Set Deleted On
DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION
@ 1, 2 SAY "Text..:" OF oDlg
@ 1, 6 GET oGet1 VAR Inicio OF oDlg SIZE 100, 10 COLOR "W/G" PICTURE "99999999"
@ 3, 7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ACTION WebPageSource()
@ 3, 16 BUTTON "&Cancel" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL
ACTIVATE DIALOG oDlg CENTERED
Return nil
FUNCTION WebPageSource(cUrl)
local oIE,cTXT,cHTML,cMemo:=""
local cString
LOCAL cString1,cString2
LOCAL oUrl, oCli,lOk
DEFAULT cUrl := "https://www.bcv.org.ve"
BEGIN SEQUENCE
oUrl = TUrl():New( cUrl )
IF EMPTY( oUrl )
BREAK
ENDIF
oCli = TIPClientHttp():New( oUrl )
IF EMPTY( oCli )
BREAK
ENDIF
IF !oCli:Open( oUrl )
BREAK
ENDIF
WHILE .T.
cString := oCli:Read()
IF Empty(cString)
EXIT
ENDIF
cMemo:=cMemo+cString
ENDDO
cString:=cMemo
oCli:Close()
oUrl:Close()
END SEQUENCE
MEMOWRIT("BCV.TXT",cMemo)
MsgInfo( cString )
MemoEdit( cString )
Return Nil