std::string HueConnector::transmit(std::string target, std::string payload)
{
std::cout << "Transmitting to " << target << " " << payload << endl;
- CURL *curl;
- CURLcode res;
+ CURL *curl = NULL;
+ CURLcode res = CURLE_OK;
struct curl_slist *headers = NULL; /* http headers to send with request */
/* set content type */
headers = curl_slist_append(headers, "Accept: application/json");
std::string HueConnector::read(std::string target)
{
std::cout << "Reading from to " << target << endl;
- CURL *curl;
- CURLcode res;
+ CURL *curl = NULL;
+ CURLcode res = CURLE_OK;
struct curl_slist *headers = NULL; /* http headers to send with request */
/* set content type */
headers = curl_slist_append(headers, "Accept: application/json");