curl-library
Re: return value check needed for curl_easy_setopt and curl_slist_append
From: Piotr Dobrogost <pd_at_curlpp.org>
Date: Sat, 21 Mar 2009 15:31:37 +0100
Date: Sat, 21 Mar 2009 15:31:37 +0100
Shivanand wrote:
> throw RuntimeExcpetion("curl_easy_setopt() could not set
> CURLOPT_FOLLOWLOCATION");
I guess you're using libcurl in C++ code.
Have you seen curlpp, a C++ wrapper over libcurl (curlpp.org)?
It takes care of translating errors to exceptions for you so you don't
have to check any return codes of libcurl at all.
It makes other nice things for you as well :)
Libcurl is great but encapsulating it in C++ interface and leveraging
C++ object semantics makes it real fun to use.
Regards
Piotr Dobrogost
Received on 2009-03-21