On Mon, May 27, 2013 at 09:27:49PM -0500, David Strauss wrote: > On Mon, May 27, 2013 at 11:33 AM, Mohammad_Alsaleh <[email protected]> wrote: > > Am I doing something wrong? > > Instead of expecting it as a header, you should read the code using > curl_easy_getinfo() with CURLINFO_RESPONSE_CODE [1], assuming > curl_easy_perform() returns CURLE_OK. > > [1] http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html#CURLINFORESPONSECODE >
I had code for this already. And why assuming CURLE_OK? The response is probably more important when e.g. CURLE_HTTP_RETURNED_ERROR is returned. And unless I'm missing something, that seems to be handled just fine. But this not what I asked anyway. What I'm actually trying to achieve is reading the error message servers sometimes send with the response. Any pointers on how to achieve that? > -- > David Strauss > | [email protected] > | +1 512 577 5827 [mobile] > ------------------------------------------------------------------- > List admin: http://cool.haxx.se/list/listinfo/curl-library > Etiquette: http://curl.haxx.se/mail/etiquette.html ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
