Yanov, Andrey wrote: > curl_slist *headers=NULL; // init to NULL is important > curl_slist_append(headers, "Accept: text/xml"); > curl_slist_append(headers, "Content-Type: text/xml"); > //curl_slist_append(headers, "charsets: utf-8"); > res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
Use "headers = curl_slist_append(headers, ...);" for each curl_slist_append() call: this function cannot change the 1st parameter since it is passed by value. However the proper new list head is returned by the function. ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
