Visual FoxPro
Visual FoxPro
Transition from Http.QuickGetObj to Http.HttpNoBody
Provides instructions for replacing deprecated QuickGetObj method calls with HttpNoBody.Chilkat Visual FoxPro Downloads
LOCAL lnSuccess
LOCAL loHttp
LOCAL lcUrl
LOCAL loResponseObj
LOCAL loResponseOut
lnSuccess = 0
loHttp = CreateObject('Chilkat.Http')
lcUrl = "https://example.com/"
* ------------------------------------------------------------------------
* The QuickGetObj method is deprecated:
loResponseObj = loHttp.QuickGetObj(lcUrl)
IF (loHttp.LastMethodSuccess = 0) THEN
? loHttp.LastErrorText
RELEASE loHttp
CANCEL
ENDIF
* ...
* ...
RELEASE loResponseObj
* ------------------------------------------------------------------------
* Do the equivalent using HttpNoBody.
* Your application creates a new, empty HttpResponse object which is passed
* in the last argument and filled upon success.
loResponseOut = CreateObject('Chilkat.HttpResponse')
lnSuccess = loHttp.HttpNoBody("GET",lcUrl,loResponseOut)
IF (lnSuccess = 0) THEN
? loHttp.LastErrorText
RELEASE loHttp
RELEASE loResponseOut
CANCEL
ENDIF
RELEASE loHttp
RELEASE loResponseOut