(Lianja) Example: Http.GetLastJsonData method
Demonstrates the GetLastJsonData method. Note: This example requires Chilkat v11.0.0 or greater.
llSuccess = .F.
loHttp = createobject("CkHttp")
loResp = createobject("CkHttpResponse")
// Only allow TLS 1.2 or better.
loHttp.SslProtocol = "TLS 1.2 or higher"
llSuccess = loHttp.HttpNoBody("GET","https://google.com/",loResp)
if (llSuccess = .F.) then
? loHttp.LastErrorText
release loHttp
release loResp
return
endif
loJson = createobject("CkJsonObject")
loJson.EmitCompact = .F.
loHttp.GetLastJsonData(loJson)
? loJson.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"
// }
// }
release loHttp
release loResp
release loJson
|