I\'m defining a PUT request with a JSON request body using libcurl in C.
This how I\'m doing it:
sprintf(jsonObj, \"\\\"name\\\" : \\\"%s\\\", \\
The problem may be with the headers. When you are configuring your curl_slist headers I think you should assign the output of curl_slist_append back to headers:
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
headers = curl_slist_append(headers, "Content-Type: application/json");
headers = curl_slist_append(headers, "charset: utf-8");