Sample code for 30+ languages & platforms
Visual FoxPro

Example: Http.QuickGetSb method

Demonstrates the QuickGetSb method.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loHttp
LOCAL loSb

lnSuccess = 0

loHttp = CreateObject('Chilkat.Http')

* Send the HTTP GET and return the content in a StringBuilder
loSb = CreateObject('Chilkat.StringBuilder')
lnSuccess = loHttp.QuickGetSb("https://www.chilkatsoft.com/helloWorld.json",loSb)
IF (loHttp.LastMethodSuccess = 0) THEN
    IF (loHttp.LastStatus = 0) THEN
        * Communications error.  We did not get a response.
        ? loHttp.LastErrorText
    ELSE
        ? "Response status code: " + STR(loHttp.LastStatus)
        ? "Response body error text:"
        ? loSb.GetAsString()
    ENDIF

    RELEASE loHttp
    RELEASE loSb
    CANCEL
ENDIF

* The downloaded content:
? loSb.GetAsString()
? "Success"

RELEASE loHttp
RELEASE loSb