Sample code for 30+ languages & platforms
Visual Basic 6.0

HTTP DELETE with Body

See more HTTP Examples

Demonstrates how to send a DELETE request with a body.

Chilkat Visual Basic 6.0 Downloads

Visual Basic 6.0
Dim success As Long
success = 0

' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

Dim http As New ChilkatHttp

' Use the HttpStr method (or HttpSb) to send a DELETE request with a body.
Dim requestBody As String
requestBody = "{ ""abc"": 123 }"
Dim resp As New ChilkatHttpResponse
success = http.HttpStr("DELETE","https://example.com/something",requestBody,"utf-8","application/json",resp)
If (success = 0) Then
    Debug.Print http.LastErrorText
    Exit Sub
End If

Debug.Print "Response status: " & resp.StatusCode
Debug.Print "Response body: "
Debug.Print resp.BodyStr