1curl_slist_append(3)            libcurl Manual            curl_slist_append(3)
2
3
4

NAME

6       curl_slist_append - add a string to an slist
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       struct  curl_slist  *curl_slist_append(struct  curl_slist  *list, const
12       char * string);
13

DESCRIPTION

15       curl_slist_append() appends a specified string  to  a  linked  list  of
16       strings. The existing list should be passed as the first argument while
17       the new list is returned from this function. The specified  string  has
18       been  appended  when  this function returns. curl_slist_append() copies
19       the string.
20
21       The   list   should    be    freed    again    (after    usage)    with
22       curl_slist_free_all(3).
23

RETURN VALUE

25       A  null  pointer  is returned if anything went wrong, otherwise the new
26       list pointer is returned.
27

EXAMPLE

29        CURL handle;
30        struct curl_slist *slist=NULL;
31
32        slist = curl_slist_append(slist, "pragma:");
33        curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist);
34
35        curl_easy_perform(handle);
36
37        curl_slist_free_all(slist); /* free the list again */
38

SEE ALSO

40       curl_slist_free_all(3),
41
42
43
44libcurl 7.10.4                    19 Jun 2003             curl_slist_append(3)
Impressum