Visual Basic 6.0
Visual Basic 6.0
Example: Http.QuickGetStr method
Demonstrates theQuickGetStr method.
Chilkat Visual Basic 6.0 Downloads
Dim http As New ChilkatHttp
' Keep the response body if there's an error.
http.KeepResponseBody = 1
' Send the HTTP GET and return the content in a string.
Dim str As String
str = http.QuickGetStr("https://www.chilkatsoft.com/helloWorld.json")
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 http.LastResponseBody
End If
Exit Sub
End If
Debug.Print str
Debug.Print "Success"