Sample code for 30+ languages & platforms
Xbase++

Example: Http.QuickGetSb method

Demonstrates the QuickGetSb method.

Chilkat Xbase++ Downloads

Xbase++
LOCAL nSuccess
LOCAL oHttp
LOCAL oSb

nSuccess := 0

oHttp := CreateObject("Chilkat.Http")

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

    oHttp:destroy()
    oSb:destroy()
    RETURN
ENDIF

//  The downloaded content:
? oSb:GetAsString()
? "Success"

oHttp:destroy()
oSb:destroy()