VB.NET
VB.NET
Example: Http.QuickGetSb method
Demonstrates theQuickGetSb method.
Chilkat VB.NET Downloads
Dim success As Boolean = False
Dim http As New Chilkat.Http
' Send the HTTP GET and return the content in a StringBuilder
Dim sb As New Chilkat.StringBuilder
success = http.QuickGetSb("https://www.chilkatsoft.com/helloWorld.json",sb)
If (http.LastMethodSuccess = False) Then
If (http.LastStatus = 0) Then
' Communications error. We did not get a response.
Debug.WriteLine(http.LastErrorText)
Else
Debug.WriteLine("Response status code: " & http.LastStatus)
Debug.WriteLine("Response body error text:")
Debug.WriteLine(sb.GetAsString())
End If
Exit Sub
End If
' The downloaded content:
Debug.WriteLine(sb.GetAsString())
Debug.WriteLine("Success")