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

Example: Http.GetLastJsonData method

Demonstrates the GetLastJsonData method.

Chilkat B4X Downloads

B4X
Dim success As Boolean = False

Dim http As ChilkatHttp
http.Initialize("http")
Dim resp As ChilkatHttpResponse
resp.Initialize

'  Only allow TLS 1.2 or better.
http.SslProtocol = "TLS 1.2 or higher"

success = http.HttpNoBody("GET", "https://google.com/", resp)
If success = False Then
    Log(http.LastErrorText)
    Return
End If


Dim json As ChilkatJsonObject
json.Initialize
json.EmitCompact = False

http.GetLastJsonData(json)
Log(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"
'    }
'  }