cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: slow HEAD request

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Mon, 8 Nov 2010 20:44:13 +0100

On Monday 08 November 2010 20:33:41 David Graf wrote:
> #include <iostream>
> #include <curl/curl.h>
>
> int main (int argc, const char * argv[]) {
>   CURL* curl = curl_easy_init();
>   curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "HEAD");
>   curl_easy_setopt(curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
>   curl_easy_setopt(curl, CURLOPT_URL, "http://www.zorba-xquery.com");

curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);

>   curl_easy_perform(curl);
>   return 0;
> }

http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTNOBODY

Kamil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-08