Skip to content

Instantly share code, notes, and snippets.

@noamr
Created December 23, 2014 16:01
Show Gist options
  • Save noamr/6b598e3dd4479e42f578 to your computer and use it in GitHub Desktop.
Save noamr/6b598e3dd4479e42f578 to your computer and use it in GitHub Desktop.
auto curl = curl_easy_init();
static const char* modes[] = { "collection", "monitoring", "lowPower", "fitness", "calibration"};
auto url = std::string("http://localhost:2700/tools/mode");
LOGE("URL :%s %s", url.c_str(), modes[mode]);
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, modes[mode]);
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