]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/curl/docs/libcurl/curl_slist_append.3
hello world
[icculus/iodoom3.git] / neo / curl / docs / libcurl / curl_slist_append.3
1 .\" You can view this file with:
2 .\" nroff -man [file]
3 .\" $Id: curl_slist_append.3,v 1.4 2004/02/27 15:34:06 bagder Exp $
4 .\"
5 .TH curl_slist_append 3 "19 Jun 2003" "libcurl 7.10.4" "libcurl Manual"
6 .SH NAME
7 curl_slist_append - add a string to an slist
8 .SH SYNOPSIS
9 .B #include <curl/curl.h>
10 .sp
11 .BI "struct curl_slist *curl_slist_append(struct curl_slist *" list,
12 .BI "const char * "string ");"
13 .ad
14 .SH DESCRIPTION
15 curl_slist_append() appends a specified string to a linked list of
16 strings. The existing \fIlist\fP should be passed as the first argument while
17 the new list is returned from this function. The specified \fIstring\fP has
18 been appended when this function returns. curl_slist_append() copies the
19 string.
20
21 The list should be freed again (after usage) with
22 \fBcurl_slist_free_all(3)\fP.
23 .SH RETURN VALUE
24 A null pointer is returned if anything went wrong, otherwise the new list
25 pointer is returned.
26 .SH EXAMPLE
27  CURL handle;
28  curl_slist *slist=NULL;
29
30  slist = curl_slist_append(slist, "pragma:");
31  curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist);
32
33  curl_easy_perform(handle);
34
35  curl_slist_free_all(slist); /* free the list again */
36 .SH "SEE ALSO"
37 .BR curl_slist_free_all "(3), "