curl-library
Re: java HTTPPOST
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 21 Jan 2005 09:57:13 +0100 (CET)
Date: Fri, 21 Jan 2005 09:57:13 +0100 (CET)
On Thu, 20 Jan 2005, s.e.t.i. wrote:
> cg.setopt(CURL.OPT_POSTFIELDS, "postfield=XXXX");
> cg.setopt(CURL.OPT_HTTPPOST, 1);
^^^ bad idea!
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTHTTPPOST
CURLOPT_HTTPPOST expects a linked list of structs. You would not use
CURLOPT_POSTFIELDS if you want to make a multipart formpost with libcurl's
"convenient" functions. (You can still use CURLOPT_POSTFIELDS to make a
multipart formpost if you create the entire post data yourself.)
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2005-01-21