cURL / Mailing Lists / curl-library / Single Mail


Re: setting POSTFIELDS to NULL forces PUT instead of GET - please document

From: Daniel Stenberg <>
Date: Sat, 26 Dec 2009 22:17:36 +0100 (CET)

On Sat, 26 Dec 2009, wrote:

> So it seems that it would be quite valuable if the documentation were as
> clear as the source comment is about the side-effects of setting POSTFIELDS.
> And as there are a few other similar side-effects to setting other options,
> it would be helpful to document those as well.

What comment are you referring to? What libcurl version are you using?

In current libcurl, CURLOPT_POSTFIELDS set (to anything) implies a POST. Thus
if you set POSTFIELDS to NULL _after_ setting HTTPGET to 1, it still will end
up in a POST.

I don't see anything in the docs that says setting POSTFIELDS to NULL is a
good idea if you don't want to send a POST.

So, can you please tell us exactly how you suggest we alter/change the docs to
make the behavior better described?

List admin:
Received on 2009-12-26