(AutoIt) Example: Http.GetLastJsonData method
Demonstrates the GetLastJsonData method. Note: This example requires Chilkat v11.0.0 or greater.
Local $bSuccess = False
$oHttp = ObjCreate("Chilkat.Http")
$oResp = ObjCreate("Chilkat.HttpResponse")
; Only allow TLS 1.2 or better.
$oHttp.SslProtocol = "TLS 1.2 or higher"
$bSuccess = $oHttp.HttpNoBody("GET","https://google.com/",$oResp)
If ($bSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
$oJson = ObjCreate("Chilkat.JsonObject")
$oJson.EmitCompact = False
$oHttp.GetLastJsonData $oJson
ConsoleWrite($oJson.Emit() & @CRLF)
; 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"
; }
; }
|