Sample code for 30+ languages & platforms
AutoIt

HTTP DELETE with Body

See more HTTP Examples

Demonstrates how to send a DELETE request with a body.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.

$oHttp = ObjCreate("Chilkat.Http")

; Use the HttpStr method (or HttpSb) to send a DELETE request with a body.
Local $sRequestBody = "{ ""abc"": 123 }"
$oResp = ObjCreate("Chilkat.HttpResponse")
$bSuccess = $oHttp.HttpStr("DELETE","https://example.com/something",$sRequestBody,"utf-8","application/json",$oResp)
If ($bSuccess = False) Then
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    Exit
EndIf

ConsoleWrite("Response status: " & $oResp.StatusCode & @CRLF)
ConsoleWrite("Response body: " & @CRLF)
ConsoleWrite($oResp.BodyStr & @CRLF)