cURL / Mailing Lists / curl-library / Single Mail

curl-library

"easier" interface (was: Redirect Ouput to a variable in dll)

From: Andrei Cipu <acipu_at_ixiacom.com>
Date: Mon, 7 May 2012 09:28:11 +0000

> -----Original Message-----
> From: curl-library-bounces_at_cool.haxx.se [mailto:curl-library-
> bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
> Sent: Sunday, May 06, 2012 8:36 PM
> To: libcurl development
> Subject: Re: Redirect Ouput to a variable in dll
>
> On Sun, 6 May 2012, Saravana kumar wrote:
>
> >> The closest thing you could have is a function like: char*
> >> curl_easy_perform2(), with the return value being NULL on error
> >
> > That's the thing which was exactly in my mind. I need it a lot. would
> > you help me?
>
> I would object to it violently. You need to produce MUCH better arguments
> why getinmemory.c is not the suitable way for you (as that is pretty much
> exactly what PHP/CURL's RETURNTRANSFER does).

Well, I would also see such a function as a wrapper over getinmemory.c The main difference would be that the code would be in the library, thus freeing the client application of memory management involved in reassembling the buffer.

Is your objection linked to the fact that such a function would divert from the rule that the return value is the error code or are there other reasons too? Perhaps libcurl could have yet another, "easier" or "super easy" interface that could take the best of what various wrappers offer?

Just sayin'
   Andrei

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-05-07