Implementation of default constructor.
| 11 | |
| 12 | // Implementation of default constructor. |
| 13 | curl_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. |
| 26 | curl_easy::curl_easy(const long flag) : curl_interface(flag) { |
nothing calls this directly
no test coverage detected