VBScript
VBScript
Example: Http.GetLastJsonData method
Demonstrates theGetLastJsonData method.
Chilkat VBScript Downloads
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)
success = 0
set http = CreateObject("Chilkat.Http")
set resp = CreateObject("Chilkat.HttpResponse")
' Only allow TLS 1.2 or better.
http.SslProtocol = "TLS 1.2 or higher"
success = http.HttpNoBody("GET","https://google.com/",resp)
If (success = 0) Then
outFile.WriteLine(http.LastErrorText)
WScript.Quit
End If
set json = CreateObject("Chilkat.JsonObject")
json.EmitCompact = 0
http.GetLastJsonData json
outFile.WriteLine(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"
' }
' }
outFile.Close