curl-library
Re: READFUNCTION + WRITEFUNCTION on GET
Date: Fri, 23 Jun 2017 13:41:05 -0700
On Thu, Jun 22, 2017 at 2:51 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Thu, 22 Jun 2017, Mark Fine via curl-library wrote:
>
> It doesn't seem possible to have libcurl callback a READFUNCTION on a GET
>> request. I have the following code:
>>
>
> It's a bit hidden and unintuitive, but possible. You need to ask to do a
> POST or PUT and then change the request method to GET with
> CURLOPT_CUSTOMREQUEST.
Thanks Daniel! That did the trick!
curl_easy_setopt(curl, CURLOPT_PUT, 1L);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
Mark
>
>
>
> --
>
> / daniel.haxx.se
>
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-06-23