curl-library
Re: slow HEAD request
Date: Mon, 8 Nov 2010 20:49:16 +0100
It works.
Thanks a lot!
David
On Nov 8, 2010, at 8:44 PM, Kamil Dudka wrote:
> 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
------------
David Graf
Software Architect
28msec Inc.
http://www.28msec.com/
http://twitter.com/28msec
------------
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-08