Visual Basic 6.0
Visual Basic 6.0
Example: Http.QuickGetSb method
Demonstrates theQuickGetSb method.
Chilkat Visual Basic 6.0 Downloads
Dim success As Long
success = 0
Dim http As New ChilkatHttp
' Send the HTTP GET and return the content in a StringBuilder
Dim sb As New ChilkatStringBuilder
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.
Debug.Print http.LastErrorText
Else
Debug.Print "Response status code: " & http.LastStatus
Debug.Print "Response body error text:"
Debug.Print sb.GetAsString()
End If
Exit Sub
End If
' The downloaded content:
Debug.Print sb.GetAsString()
Debug.Print "Success"