B4X
B4X
HTTP DELETE with Body
See more HTTP Examples
Demonstrates how to send a DELETE request with a body.Chilkat B4X 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 ChilkatHttp
http.Initialize("http")
' Use the HttpStr method (or HttpSb) to send a DELETE request with a body.
Dim requestBody As String = "{ " & Chr(34) & "abc" & Chr(34) & ": 123 }"
Dim resp As ChilkatHttpResponse
resp.Initialize
success = http.HttpStr("DELETE", "https://example.com/something", requestBody, "utf-8", "application/json", resp)
If success = False Then
Log(http.LastErrorText)
Return
End If
Log("Response status: " & resp.StatusCode)
Log("Response body: ")
Log(resp.BodyStr)