Visual FoxPro
Visual FoxPro
Transition from Http.QuickRequest to Http.HttpNoBody
Provides instructions for replacing deprecated QuickRequest method calls with HttpNoBody.Chilkat Visual FoxPro Downloads
LOCAL lnSuccess
LOCAL loHttp
LOCAL lcUrl
LOCAL lcVerb
LOCAL loResponseObj
LOCAL loResponseOut
lnSuccess = 0
loHttp = CreateObject('Chilkat.Http')
lcUrl = "https://example.com/"
lcVerb = "DELETE"
* ------------------------------------------------------------------------
* The QuickRequest method is deprecated:
loResponseObj = loHttp.QuickRequest(lcVerb,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(lcVerb,lcUrl,loResponseOut)
IF (lnSuccess = 0) THEN
? loHttp.LastErrorText
RELEASE loHttp
RELEASE loResponseOut
CANCEL
ENDIF
RELEASE loHttp
RELEASE loResponseOut