curl_slist_append   Début   Précédent   Suivant   Sommaire   Préc.page.lue   Accueil
Section: libcurl Manual (3)
Updated: 19 Jun 2003
Sommaire  



NAME   Début   Précédent   Suivant   Sommaire   Préc.page.lue   Accueil
curl_slist_append - add a string to an slist  



SYNOPSIS   Début   Précédent   Suivant   Sommaire   Préc.page.lue   Accueil
#include <curl/curl.h>

struct curl_slist *curl_slist_append(struct curl_slist *list, const char * string);  




DESCRIPTION   Début   Précédent   Suivant   Sommaire   Préc.page.lue   Accueil
curl_slist_append() appends a specified string to a linked list of strings. The existing list should be passed as the first argument while the new list is returned from this function. The specified string has been appended when this function returns. curl_slist_append() copies the string.

The list should be freed again (after usage) with curl_slist_free_all(3).  




RETURN VALUE   Début   Précédent   Suivant   Sommaire   Préc.page.lue   Accueil
A null pointer is returned if anything went wrong, otherwise the new list pointer is returned.  



EXAMPLE   Début   Précédent   Suivant   Sommaire   Préc.page.lue   Accueil
 CURL handle;
 struct curl_slist *slist=NULL;

 slist = curl_slist_append(slist, "pragma:");
 curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist);

 curl_easy_perform(handle);

 curl_slist_free_all(slist); /* free the list again */
 



SEE ALSO   Début   Précédent   Suivant   Sommaire   Préc.page.lue   Accueil
curl_slist_free_all(3),


 



Sommaire   Début   Suivant   Sommaire   Préc.page.lue   Accueil
NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
EXAMPLE
SEE ALSO

Ce document a été créé par man2html suivi de man2html.pl, le 17/10/2008 17:55:24, en utilisant les pages de 'man'.
 

Valid HTML 4.01 Transitional