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