<code>
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers,
"Host: www.cnblogs.com"
);
headers = curl_slist_append(headers,
"User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0"
);
headers = curl_slist_append(headers,
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
);
headers = curl_slist_append(headers,
"Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3"
);
headers = curl_slist_append(headers,
"Accept-Encoding: gzip, deflate"
);
headers = curl_slist_append(headers,
"Connection: keep-alive"
);
headers = curl_slist_append(headers,
"If-Modified-Since: Mon, 09 Dec 2013 03:41:17 GMT"
);
curl_easy_setopt(easy_handle, CURLOPT_HTTPHEADER, headers);
</code>