curl-library
Re: using libcurl for HTTP PUT -> but curl_easy_perform always returns CURLE_OK
Date: Tue, 3 Jul 2012 22:54:36 +0200
On Tue, Jul 03, 2012 at 05:35:33PM +0200, Pit Müller wrote:
> What is the official way for error handling here?
> Should i generally ignore the return value and always check only
> CURLINFO_RESPONSE_CODE?
There are two levels of possible errors here: at the network level and
at the HTTP level. The return value will tell you about any network
level or configuration problems, while CURLINFO_RESPONSE_CODE will tell
you about any higher-level problems. You can use the
CURLOPT_FAILONERROR option to make libcurl convert some HTTP errors
into CURLE-type errors, but read about the caveats first.
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-03