Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CURL *hnd = curl_easy_init();
- curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
- curl_easy_setopt(hnd, CURLOPT_URL, "https://partamon-api.herokuapp.com/sync/weather_station");
- struct curl_slist *headers = NULL;
- headers = curl_slist_append(headers, "Postman-Token: d77a9591-e5e3-4dbf-aeb5-d9205ce767c1");
- headers = curl_slist_append(headers, "Cache-Control: no-cache");
- headers = curl_slist_append(headers, "Content-Type: application/x-www-form-urlencoded");
- curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
- curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "parametro=valor_parametro_aqui");
- CURLcode ret = curl_easy_perform(hnd);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement