Skip to content

Instantly share code, notes, and snippets.

@noamr
Created December 23, 2014 15:53
Show Gist options
  • Save noamr/2fde7414880acf8ef1eb to your computer and use it in GitHub Desktop.
Save noamr/2fde7414880acf8ef1eb to your computer and use it in GitHub Desktop.
auto curl = curl_easy_init();
static const char* modes[] = { "collection", "monitoring", "lowPower", "fitness", "calibration"};
curl_easy_setopt(curl, CURLOPT_URL, (std::string("http://localhost:2700/tools/mode?mode=") + modes[mode]).c_str());
curl_easy_setopt(curl, CURLOPT_POST, 1);
curl_easy_perform(curl);
curl_easy_cleanup(curl);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment