| 1 |
.\" ************************************************************************** |
| 2 |
.\" * _ _ ____ _ |
| 3 |
.\" * Project ___| | | | _ \| | |
| 4 |
.\" * / __| | | | |_) | | |
| 5 |
.\" * | (__| |_| | _ <| |___ |
| 6 |
.\" * \___|\___/|_| \_\_____| |
| 7 |
.\" * |
| 8 |
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <[email protected]>, et al. |
| 9 |
.\" * |
| 10 |
.\" * This software is licensed as described in the file COPYING, which |
| 11 |
.\" * you should have received as part of this distribution. The terms |
| 12 |
.\" * are also available at https://curl.haxx.se/docs/copyright.html. |
| 13 |
.\" * |
| 14 |
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell |
| 15 |
.\" * copies of the Software, and permit persons to whom the Software is |
| 16 |
.\" * furnished to do so, under the terms of the COPYING file. |
| 17 |
.\" * |
| 18 |
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 19 |
.\" * KIND, either express or implied. |
| 20 |
.\" * |
| 21 |
.\" ************************************************************************** |
| 22 |
.TH curl_slist_free_all 3 "5 March 2001" "libcurl 7.0" "libcurl Manual" |
| 23 |
.SH NAME |
| 24 |
curl_slist_free_all - free an entire curl_slist list |
| 25 |
.SH SYNOPSIS |
| 26 |
.B #include <curl/curl.h> |
| 27 |
.sp |
| 28 |
.BI "void curl_slist_free_all(struct curl_slist *" list); |
| 29 |
.ad |
| 30 |
.SH DESCRIPTION |
| 31 |
curl_slist_free_all() removes all traces of a previously built curl_slist |
| 32 |
linked list. |
| 33 |
|
| 34 |
Passing in a NULL pointer in \fIlist\fP will make this function return |
| 35 |
immediately with no action. |
| 36 |
.SH RETURN VALUE |
| 37 |
Nothing. |
| 38 |
.SH EXAMPLE |
| 39 |
.nf |
| 40 |
CURL *handle; |
| 41 |
struct curl_slist *slist=NULL; |
| 42 |
|
| 43 |
slist = curl_slist_append(slist, "X-libcurl: coolness"); |
| 44 |
|
| 45 |
if (slist == NULL) |
| 46 |
return -1; |
| 47 |
|
| 48 |
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist); |
| 49 |
|
| 50 |
curl_easy_perform(handle); |
| 51 |
|
| 52 |
curl_slist_free_all(slist); /* free the list again */ |
| 53 |
.fi |
| 54 |
.SH "SEE ALSO" |
| 55 |
.BR curl_slist_append "(3), " |