Learning Curve Plus Plus (LCPP)
curl.h
Go to the documentation of this file.
1 /**
2  * @file curl.h
3  * @author Ozgur Taylan Turan
4  *
5  * This file is for curl related extra helpers
6  *
7  */
8 namespace utils {
9 //-----------------------------------------------------------------------------
10 // Callback: function to write obtained data to a string
11 //-----------------------------------------------------------------------------
12 size_t WriteCallback(void* contents, size_t size, size_t nmemb, void* userp)
13 {
14  ((std::string*)userp)->append((char*)contents, size * nmemb);
15  return size * nmemb;
16 }
17 
18 } // namespace utils