cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

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

On Sat, 26 Dec 2009, chris-curl_at_cybermato.com 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?

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