Sample code for 30+ languages & platforms
CkPython

Example: Http.QuickGetSb method

Demonstrates the QuickGetSb method.

Chilkat CkPython Downloads

CkPython
import sys
import chilkat

success = False

http = chilkat.CkHttp()

# Send the HTTP GET and return the content in a StringBuilder
sb = chilkat.CkStringBuilder()
success = http.QuickGetSb("https://www.chilkatsoft.com/helloWorld.json",sb)
if (http.get_LastMethodSuccess() == False):
    if (http.get_LastStatus() == 0):
        # Communications error.  We did not get a response.
        print(http.lastErrorText())
    else:
        print("Response status code: " + str(http.get_LastStatus()))
        print("Response body error text:")
        print(sb.getAsString())

    sys.exit()

# The downloaded content:
print(sb.getAsString())
print("Success")