Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: curl_mime_* API: how to send post request with empty body?
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Christoph M. Becker via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 15 Jan 2021 13:48:16 +0100
On 14.01.2021 at 16:36, Daniel Stenberg wrote:
> On Mon, 11 Jan 2021, Christoph M. Becker via curl-library wrote:
>
>> I wanted to send a post request with an empty body, and found that
>>
>> curl_easy_setopt(handle, CURLOPT_MIMEPOST, NULL);
>>
>> allows me to do so.
>
> There are other ways to do it as well, like setting CURLOPT_POSTFIELDS
> to a zero length string.
Ah, of course. Thank you!
>> But it does not work to reset a formerly set mimepost, e.g.
>
> This is a bug. I filed it on GitHub:
> https://github.com/curl/curl/issues/6455
>
> and created a pull request with a fix:
> https://github.com/curl/curl/pull/6456
Wow, that was fast! I assume the fix will ship with cURL 7.76.0.
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-01-15
Date: Fri, 15 Jan 2021 13:48:16 +0100
On 14.01.2021 at 16:36, Daniel Stenberg wrote:
> On Mon, 11 Jan 2021, Christoph M. Becker via curl-library wrote:
>
>> I wanted to send a post request with an empty body, and found that
>>
>> curl_easy_setopt(handle, CURLOPT_MIMEPOST, NULL);
>>
>> allows me to do so.
>
> There are other ways to do it as well, like setting CURLOPT_POSTFIELDS
> to a zero length string.
Ah, of course. Thank you!
>> But it does not work to reset a formerly set mimepost, e.g.
>
> This is a bug. I filed it on GitHub:
> https://github.com/curl/curl/issues/6455
>
> and created a pull request with a fix:
> https://github.com/curl/curl/pull/6456
Wow, that was fast! I assume the fix will ship with cURL 7.76.0.
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-01-15