cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Only receive header info

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 16 Mar 2005 01:17:54 +0100 (CET)

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