~ubuntu-branches/ubuntu/warty/curl/warty

« back to all changes in this revision

Viewing changes to docs/libcurl/curl_slist_append.3

  • Committer: Bazaar Package Importer
  • Author(s): Domenico Andreoli
  • Date: 2004-06-04 19:09:25 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040604190925-wy048bp31320r2z6
Tags: 7.12.0.is.7.11.2-1
* Reverted to version 7.11.2 (closes: #252348).
* Disabled support for libidn (closes: #252367). This is to leave
  curl in unstable as much similar as possible to the one in testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
.\" You can view this file with:
2
2
.\" nroff -man [file]
3
 
.\" $Id: curl_slist_append.3,v 1.1 2002/03/04 10:09:49 bagder Exp $
 
3
.\" $Id: curl_slist_append.3,v 1.4 2004/02/27 15:34:06 bagder Exp $
4
4
.\"
5
 
.TH curl_slist_append 3 "5 March 2001" "libcurl 7.0" "libcurl Manual"
 
5
.TH curl_slist_append 3 "19 Jun 2003" "libcurl 7.10.4" "libcurl Manual"
6
6
.SH NAME
7
7
curl_slist_append - add a string to an slist
8
8
.SH SYNOPSIS
13
13
.ad
14
14
.SH DESCRIPTION
15
15
curl_slist_append() appends a specified string to a linked list of
16
 
strings. The existing
17
 
.I list
18
 
should be passed as the first argument while the new list is returned from
19
 
this function. The specified
20
 
.I string
21
 
has been appended when this function returns.
 
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.
22
23
.SH RETURN VALUE
23
24
A null pointer is returned if anything went wrong, otherwise the new list
24
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 */
25
36
.SH "SEE ALSO"
26
37
.BR curl_slist_free_all "(3), "
27
 
.SH BUGS
28
 
Surely there are some, you tell me!
29