Sample code for 30+ languages & platforms
Classic ASP

Example: Http.QuickGetSb method

Demonstrates the QuickGetSb method.

Chilkat Classic ASP Downloads

Classic ASP
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0

set http = Server.CreateObject("Chilkat.Http")

' Send the HTTP GET and return the content in a StringBuilder
set sb = Server.CreateObject("Chilkat.StringBuilder")
success = http.QuickGetSb("https://www.chilkatsoft.com/helloWorld.json",sb)
If (http.LastMethodSuccess = 0) Then
    If (http.LastStatus = 0) Then
        ' Communications error.  We did not get a response.
        Response.Write "<pre>" & Server.HTMLEncode( http.LastErrorText) & "</pre>"
    Else
        Response.Write "<pre>" & Server.HTMLEncode( "Response status code: " & http.LastStatus) & "</pre>"
        Response.Write "<pre>" & Server.HTMLEncode( "Response body error text:") & "</pre>"
        Response.Write "<pre>" & Server.HTMLEncode( sb.GetAsString()) & "</pre>"
    End If

    Response.End
End If

' The downloaded content:
Response.Write "<pre>" & Server.HTMLEncode( sb.GetAsString()) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "Success") & "</pre>"

%>
</body>
</html>