Sample code for 30+ languages & platforms
CkPython Requires Chilkat v11.0.0+

Example: Http.GetLastJsonData method

Demonstrates the GetLastJsonData method.

Chilkat CkPython Downloads

CkPython
import sys
import chilkat

success = False

http = chilkat.CkHttp()
resp = chilkat.CkHttpResponse()

#  Only allow TLS 1.2 or better.
http.put_SslProtocol("TLS 1.2 or higher")

success = http.HttpNoBody("GET","https://google.com/",resp)
if (success == False):
    print(http.lastErrorText())
    sys.exit()

json = chilkat.CkJsonObject()
json.put_EmitCompact(False)

http.GetLastJsonData(json)
print(json.emit())

#  Output as of Chilkat v11.1.0
#  Additional information may be added as requested or needed in future versions of Chilkat.

#  {
#    "tls": {
#      "params": {
#        "sniHostname": "www.google.com",
#        "allowConnectionOnlyIfServerChooses": "TLS 1.2 or higher"
#      },
#      "negotiatedTlsVersion": "TLS 1.3"
#    }
#  }