Sample code for 30+ languages & platforms
Visual Basic 6.0

Send a REST Request with No Body

See more REST Examples

Demonstrates Rest.FullRequestNoBody, which sends a complete request with no request body (such as a GET or DELETE) and returns the response body as text.

Background. This is the simplest full-request convenience method, ideal for retrieval and deletion calls that carry no request payload.

Chilkat Visual Basic 6.0 Downloads

Visual Basic 6.0
Dim success As Long
success = 0

Dim rest As New ChilkatRest
Dim bTls As Long
bTls = 1
Dim bAutoReconnect As Long
bAutoReconnect = 1
success = rest.Connect("example.com",443,bTls,bAutoReconnect)
If (success = 0) Then
    Debug.Print rest.LastErrorText
    Exit Sub
End If

'  Send a complete request with no request body, such as a GET or DELETE.  The response body is read
'  as text and returned.
Dim responseText As String
responseText = rest.FullRequestNoBody("GET","/api/items/123")
If (rest.LastMethodSuccess = 0) Then
    Debug.Print rest.LastErrorText
    Exit Sub
End If

Debug.Print responseText