cURL / Mailing Lists / curl-library / Single Mail


Re: How to do http "DELETE" in libcurl

From: cnm marketing <>
Date: Wed, 27 Jan 2016 11:48:15 -0500

I am trying to achieve the following http "DELETE" in REST -

//url portion
 HTTP DELETE https://xxxxxx/object?name=xyz
 // body portion

The url portion uses curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST,
And the boday portion uses curl_easy_setopt(curlHandle, CURLOPT_POSTFIELDS,

Will it work in libcurl?

Message: 4
Date: Tue, 26 Jan 2016 23:51:34 +0100 (CET)
From: Daniel Stenberg <>
To: libcurl development <>
Subject: Re: How to do http "DELETE" in libcurl
Message-ID: <>
Content-Type: text/plain; charset=US-ASCII; format=flowed

On Tue, 26 Jan 2016, cnm marketing wrote:

> Does the following make sense to you, I found this some place, but want to
> make sure this is valid:
> curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "DELETE");
> NOTE - send body with HTTP DELETE
> I suggest you simply set the body with CURLOPT_POSTFIELDS and set

You can certainly do that, sure. If that's the correct action for your
situation, we can't tell.

List admin:
Received on 2016-01-27