cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: problem saving urlcode (string)

From: Arno Nühm <informatik4u_at_web.de>
Date: Thu, 14 Apr 2005 13:40:45 +0200

Hi, thank you very much. i got it now.
i only wonder why the console output worked like that:

res = curl_easy_perform(curl);
xmldata = res; // xmldata is a c++ string
cout << xmldata;

when res should only be a CURLcode type?

Toby Peterson <toby.peterson_at_gmail.com>, libcurl development <curl-library_at_cool.haxx.se> schrieb am 14.04.05 13:22:17:
>
> On 4/14/05, informatik4u_at_web.de <informatik4u_at_web.de> wrote:
> > Hi, i am programming under linux a programm which loads a website with a xml structur.
> > when i am trying to save the xmlcode string i get an empty file (1 byte large).
> >
> > here is my code for reading the string:
> > ...
> > res = curl_easy_perform(curl);
> > xmldata = res; // xmldata is a c++ string
>
> curl_easy_perform simply returns CURLcode (a status indication). To
> read the data into memory, you'll need to use callbacks; something
> similar to this example:
> http://curl.haxx.se/lxr/source/docs/examples/getinmemory.c
>
> - Toby
>

__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201
Received on 2005-04-14

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET