cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to do http "DELETE" in libcurl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 26 Jan 2016 23:51:34 +0100 (CET)

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
> CURLOPT_CUSTOMREQUEST to "DELETE". Done.

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

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2016-01-26