curl-library
Finding the HTTP status code of http response
From: ying lcs <yinglcs_at_gmail.com>
Date: Fri, 13 Jul 2007 01:46:30 -0500
Date: Fri, 13 Jul 2007 01:46:30 -0500
Hi,
I am trying to find the HTTP status code of http response (e.g. 200, 504).
I am doing that by checking the return value of curl_easy_perform().
But I always get 0 regardless the HTTP response code. Can you please
tell me how can i
check the http response code?
curl_easy_setopt(curl_handle, CURLOPT_URL,
"http://127.0.0.1/apache2-default/index2.html");
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
if( curl_easy_perform(curl_handle) == 0) {
//...
}
Received on 2007-07-13