curlslistappend(3) libcurl Manual curlslistappend(3)
NAME
curlslistappend - add a string to an slist
SYNOPSIS
##include <>
struct curlslist **curlslistappend(struct curlslist **list, const
char ** string);;
DESCRIPTION
curlslistappend() 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. curlslistappend() copies
the string.
The list should be freed again (after usage) with
curlslistfreeall(3).
RETURN VALUE
A null pointer is returned if anything went wrong, otherwise the new
list pointer is returned.
EXAMPLE
CURL handle;
curlslist *slist=NUL;
slist = curlslistappend(slist, "pragma:");
curleasysetopt(handle, CURLOPTHTPHEADER, slist);
curleasyperform(handle);
curlslistfreeall(slist); /* free the list again */
SEE ALSO
curlslistfreeall(3),
libcurl 7.10.4 19 Jun 2003 curlslistappend(3)
|