(Xojo Plugin) HTTP DELETE with Body
Demonstrates how to send a DELETE request with a body. Note: This example requires Chilkat v11.0.0 or greater.
Dim success As Boolean
success = 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
requestBody = "{ ""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
System.DebugLog(http.LastErrorText)
Return
End If
System.DebugLog("Response status: " + Str(resp.StatusCode))
System.DebugLog("Response body: ")
System.DebugLog(resp.BodyStr)
|