curl-library
Re: Finding the HTTP status code of http response
From: Aleksandar Lazic <al-curllibrary_at_none.at>
Date: Fri, 13 Jul 2007 10:43:42 +0200
Date: Fri, 13 Jul 2007 10:43:42 +0200
Hi,
On Fre 13.07.2007 01:46, ying lcs wrote:
>
>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?
Have you ever looked into the manpage of curl_easy_getinfo or
http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html
CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... );
.
.
.
CURLINFO_RESPONSE_CODE
.
.
the second entry!
Cheers
Aleks
Received on 2007-07-13