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: d280300c-97e3-462f-93b5-ba38e399de7e");
- headers = curl_slist_append(headers, "Cache-Control: no-cache");
- headers = curl_slist_append(headers, "Content-Type: application/json");
- curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
- curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n\t\"parametro_1\": \"valor aqui\"\n}");
- CURLcode ret = curl_easy_perform(hnd);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement