Not sure which version of CF you are using. However, I suspect that you are not doing anything wrong, but <cfhttp> just does not send the body when method="DELETE" , which makes sense given the error message.
An easy way to test this is to point to your <cfhttp> call to the test page on your local CF server. On a dump of the GetHttpRequestData() test page so that you can view the actual headers and content. (Another option is to use the built-in TCPMonitor in the open port, which provides more detailed information about requests and responses. However, for this scenario, the first method is simple.)
Testing Page
<cfdump var="#getHTTPRequestData()#">
Request
<cfset requestBody["purge_everything"] = true> <cfhttp url="http://localhost/testPage.cfm" method="DELETE" result="cFlare" charset="utf-8" > <cfhttpparam type="header" name="X-Auth-Email" value=" a@b.c "> <cfhttpparam type="header" name="X-Auth-Key" value="XYZ"> <cfhttpparam type="header" name="Content-Type" value="application/json; charset=utf-8"> <cfhttpparam type="header" name="accept" value="*/*"> <cfhttpparam type="body" value="#serializeJson(requestBody)#" encoded="false"> </cfhttp> <cfoutput>#cFlare.fileContent#</cfoutput>
Note that the content, or body, is empty when method="DELETE" ? However, change it to method="POST" and the magic will appear in the content.

Sending a body using a DELETE query must be valid, so this sounds like an error. If so, you will need to find another tool to make an http request, for example, call curl.exe from cfexecute or use a special tag, for example cfx_http5, or use java classes such as URLConnection or Apache HTTPClient .
Leigh source share