cURL / Mailing Lists / curl-library / Single Mail


patch for contenttype

From: Giaslas Georgios <>
Date: Tue, 29 Jan 2002 12:02:57 +0200 (EET)

i have attached a patch for curl-7.9.3 to get the content type of
the last downloaded HTTP object.

You can use it as follows:

curl_easy_getinfo(curlhandle, CURLINFO_CONTENT_TYPE, &contenttype);
if (contentype) fprintf(stdout, "%s", contenttype);

where 'contenttype' is a char *
Note that if the server doesn't send the content-type of the
document, the variable 'contentype' will be NULL.

Hope you add it to v.7.9.4

Received on 2002-01-29