Classic ASP
Classic ASP
Example: Http.GetLastJsonData method
Demonstrates theGetLastJsonData method.
Chilkat Classic ASP Downloads
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0
set http = Server.CreateObject("Chilkat.Http")
set resp = Server.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
Response.Write "<pre>" & Server.HTMLEncode( http.LastErrorText) & "</pre>"
Response.End
End If
set json = Server.CreateObject("Chilkat.JsonObject")
json.EmitCompact = 0
http.GetLastJsonData json
Response.Write "<pre>" & Server.HTMLEncode( json.Emit()) & "</pre>"
' 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"
' }
' }
%>
</body>
</html>