cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Only receive header info

From: Daniel Czarnecki <daniel_at_zoltak.com>
Date: Wed, 16 Mar 2005 16:05:11 +1100

Thanks for that.

If I got the header as part of a GET how could I cancel the transfer after the
header has been processed? Can I issue some sort of command in the first
WRITEFUNCTION call? Is the WRITEFUNCTION only called after the header has been
processed?

Quoting Daniel Stenberg <daniel-curl_at_haxx.se>:

> On Wed, 16 Mar 2005, Daniel Czarnecki wrote:
>
> > How can I get curl to only download the header info and skip the data all
>
> > together?
>
> You mean you want to make a HEAD request?
>
> http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTNOBODY
>
> > Setting the WRITEFUNCTION to my own custom function that has a blank body
>
> > still requires curl to download the whole file?
>
> If you make a GET/POST/PUT request, yes. But that is the nature of these
> requests, it isn't something libcurl has invented. You can of course abort
> the
> transfer prematurely if you want.
>
> --
> Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
> Dedicated custom curl help for hire: http://haxx.se/curl.html
>
Received on 2005-03-16