MCPcopy Create free account
hub / github.com/JosephP91/curlcpp / curl_easy

Method curl_easy

src/curl_easy.cpp:13–23  ·  view source on GitHub ↗

Implementation of default constructor.

Source from the content-addressed store, hash-verified

11
12// Implementation of default constructor.
13curl_easy::curl_easy() : curl_interface() {
14 this->curl = curl_easy_init();
15 if (this->curl == nullptr) {
16 throw curl_easy_exception("Null pointer intercepted",__FUNCTION__);
17 }
18 curl_ios<ostream> writer;
19 this->add<CURLOPT_WRITEFUNCTION>(writer.get_function());
20 this->add<CURLOPT_WRITEDATA>(static_cast<void*>(writer.get_stream()));
21 this->add<CURLOPT_HEADERFUNCTION>(writer.get_function());
22 this->add<CURLOPT_HEADERDATA>(static_cast<void *>(writer.get_stream()));
23}
24
25// Implementation of overridden constructor.
26curl_easy::curl_easy(const long flag) : curl_interface(flag) {

Callers

nothing calls this directly

Calls 3

curl_easy_exceptionClass · 0.85
get_functionMethod · 0.45
get_streamMethod · 0.45

Tested by

no test coverage detected