cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: struct curl_httppost goes hidden

From: Jeff Pohlmeyer <yetanothergeek_at_yahoo.com>
Date: Mon, 23 Feb 2004 04:06:59 -0800 (PST)

> I'm about to commit a change that makes the public version
> of this struct hide all internal details of how it looks.

Oh No !!!

Currently, my Delphi component wrapper manipulates these
structures directly to build the list.

So instead of making the user do this:

    curl_formadd(
      @FirstPost, @LastPost,
      [
        CURLFORM_COPYNAME, 'readthis',
        CURLFORM_FILECONTENT, 'sendme.txt',
        CURLFORM_CONTENTTYPE, 'text/plain',
        CURLFORM_END
      ]
    );
    MyCurl.HttpPost:=FirstPost;

They can just use this:
  MyCurl.FormData.Add( 'readthis', 'sendme.txt', 'text/plain', POST_TYPE_FILEDATA );

 - And the component will handle all the gory details.

I haven't looked at that part of the code in a while, but I
suppose I can just rewrite it to use curl_formadd() internally.

I'm not even sure why I didn't do that in the first place,
other than the fact that I was having a hard time getting
my head around curl_formadd.

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
Received on 2004-02-23