Sample code for 30+ languages & platforms
B4X Requires Chilkat v11.0.0+

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 B4X Downloads

B4X
Dim success As Boolean = False

Dim http As ChilkatHttp
http.Initialize("http")
Dim resp As ChilkatHttpResponse
resp.Initialize

'  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
    Log(http.LastErrorText)
    Return
End If


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