curl-library
Re: Help with C and curl
From: Dimitar Dimitrov <silent.cutthroat_at_gmail.com>
Date: Sat, 3 Oct 2009 20:51:04 +0300
Date: Sat, 3 Oct 2009 20:51:04 +0300
On Sat, Oct 3, 2009 at 7:56 PM, <pppsss7_at_gmail.com> wrote:
> char errbuf[CURL_ERROR_SIZE],result;
...
> curl_easy_getinfo(curl,CURLINFO_CONTENT_TYPE,&result);
> printf("%c\n", result);
From the manual:
> CURLINFO_CONTENT_TYPE
> Pass a pointer to a char pointer to receive the content-type of the downloaded object.
result should be a pointer, so curl_easy_getinfo can store the address
of the string there:
> char *result;
And then print it with:
> printf("%s\n", result);
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-10-03