cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to use libcurl to evoke an HTTP PATCH method

From: Joel DePooter <joel.depooter_at_safe.com>
Date: Fri, 12 Aug 2016 13:05:21 -0700

Use the CURLOPT_CUSTOMREQUEST option:

curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");

-Joel

On Fri, Aug 12, 2016 at 10:53 AM, Blake McBride <blake1024_at_gmail.com> wrote:

> Hi,
>
> I am using:
>
>
> * if (!strcmp(ci->httpVerb, "GET"))*
> * curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L);*
> * else if (!strcmp(ci->httpVerb, "POST"))*
> * curl_easy_setopt(curl, CURLOPT_POST, 1L);*
> * else if (!strcmp(ci->httpVerb, "PUT"))*
> * curl_easy_setopt(curl, CURLOPT_PUT, 1L);*
> * else if (!strcmp(ci->httpVerb, "PATCH"))*
> * ???????????;*
>
>
> I can't figure out what to do in the case of a PATCH method. Sure
> appreciate some help.
>
> Thanks!
>
> Blake McBride
>
>
> -------------------------------------------------------------------
> List admin: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html
>

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-08-12