Sample code for 30+ languages & platforms
VB.NET

Example: Http.HttpNoBody method

Demonstrates how to use the HttpNoBody method to send HTTP requests without a request body (e.g., GET, DELETE, HEAD) and receive the response in a Chilkat Http response object.

Chilkat VB.NET Downloads

VB.NET
Dim success As Boolean = False

Dim http As New Chilkat.Http
Dim resp As New Chilkat.HttpResponse

' Send a DELETE request to https://api.example.com/users/123
Dim url As String = "https://api.example.com/users/123"
success = http.HttpNoBody("DELETE",url,resp)
If (success = False) Then
    Debug.WriteLine(http.LastErrorText)
    Exit Sub
End If


Debug.WriteLine("Response Status Code: " & resp.StatusCode)
Debug.WriteLine("Response body:")
Debug.WriteLine(resp.BodyStr)