Sample code for 30+ languages & platforms
Visual FoxPro

Transition from Http.QuickRequestParams to Http.HttpParams

Provides instructions for replacing deprecated QuickRequestParams method calls with HttpParams.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loHttp
LOCAL lcVerb
LOCAL lcUrl
LOCAL loJson
LOCAL loResponseObj
LOCAL loResponseOut

lnSuccess = 0

loHttp = CreateObject('Chilkat.Http')

lcVerb = "GET"
lcUrl = "https://example.com/"

loJson = CreateObject('Chilkat.JsonObject')
loJson.UpdateInt("param1",100)
loJson.UpdateString("param2","test")

* ------------------------------------------------------------------------
* The QuickRequestParams method is deprecated:

loResponseObj = loHttp.QuickRequestParams(lcVerb,lcUrl,loJson)
IF (loHttp.LastMethodSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    RELEASE loJson
    CANCEL
ENDIF

* ...
* ...

RELEASE loResponseObj

* ------------------------------------------------------------------------
* Do the equivalent using HttpParams.
* 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.HttpParams(lcVerb,lcUrl,loJson,loResponseOut)
IF (lnSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    RELEASE loJson
    RELEASE loResponseOut
    CANCEL
ENDIF

RELEASE loHttp
RELEASE loJson
RELEASE loResponseOut