9 #ifndef INCLUDE_FUNAPI_NETWORK_CURL_H_
10 #define INCLUDE_FUNAPI_NETWORK_CURL_H_
12 #include <curl/curl.h>
27 class Curl :
public boost::enable_shared_from_this<Curl>,
28 private boost::noncopyable {
30 DECLARE_CLASS_PTR(
Curl);
33 typedef boost::function<void(CURLcode)>
Callback;
75 Ptr<impl::Curl> impl_;
80 #endif // INCLUDE_FUNAPI_NETWORK_CURL_H_
void set_verbose(bool on)
Set verbosity.
Wrapepr class for libcurl.
Definition: curl.h:27
CURLcode StartSync(const string &url)
Kickstarts to fetch the url in a synchronous manner.
void StartAsync(const string &url, const Callback &cb)
Runs in an asynchronouse way.
CURL * handle()
Getter to access the native handle.
CURLcode GetResultCode() const
Returns the stored result code in CURLcode.
bool IsReady() const
Checks if the curl instance is ready to use.
boost::function< void(CURLcode)> Callback
Callback for asynchronous operations.
Definition: curl.h:33
string GetResult() const
Returns the stored result in the string format.