VB.NET
VB.NET
HTTP DELETE with Body
See more HTTP Examples
Demonstrates how to send a DELETE request with a body.Chilkat VB.NET Downloads
Dim success As Boolean = False
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Dim http As New Chilkat.Http
' Use the HttpStr method (or HttpSb) to send a DELETE request with a body.
Dim requestBody As String = "{ ""abc"": 123 }"
Dim resp As New Chilkat.HttpResponse
success = http.HttpStr("DELETE","https://example.com/something",requestBody,"utf-8","application/json",resp)
If (success = False) Then
Debug.WriteLine(http.LastErrorText)
Exit Sub
End If
Debug.WriteLine("Response status: " & resp.StatusCode)
Debug.WriteLine("Response body: ")
Debug.WriteLine(resp.BodyStr)