cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_formadd() error

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 20 Jun 2002 10:52:12 +0200 (MET DST)

On Wed, 19 Jun 2002, SHIRETU wrote:

> Why after I run curl_formadd(....) a obtain a CURLE_COULDNT_RESOLVE_PROXY
> error?

Because you misinterpreted the curl_formadd() return type.

> CURLcode res;

[snip]

> res=(CURLcode)curl_formadd(&post, &last,
> CURLFORM_BUFFER, "data.txt",
> CURLFORM_BUFFERPTR, buffer,
> CURLFORM_BUFFERLENGTH, strlen(buffer),
> CURLFORM_CONTENTTYPE, "text/html",
> CURLFORM_END);

See? You even had to typecast the curl_formadd() return type. Check the
header file or man page for details.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
-------------------------------------------------------
                   Bringing you mounds of caffeinated joy
                   >>>     http://thinkgeek.com/sf    <<<
Received on 2002-06-20