cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 24 Aug 2007 12:29:00 +0200 (CEST)

On Fri, 24 Aug 2007, Artyom Vorobyev wrote:

> I have the following problem when I'm using the libcurl with Java on my PC
> with Win32 platform:

libcurl with Java is not very widely used, which might hamper your chances of
getting help...

> when I'm trying to store the data returned by request in the file by using
> cg.setopt(CURL.OPT_FILE, "c:\\mail.txt");

No pure libcurl option takes a file name, and I doubt the java binding does
either. This looks plain wrong.

Are you using libcurl as a DLL? If so, then you need to also provide your own
write callback.

> So - what is the write way to store the data that I'm getting by libcurl in
> the file or in the String variable?

See the getinmemory.c example on how it is done in plain libcurl, then you
need to adapt it to instead do the similar using your selected binding.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-08-24