2011-03-11 18:14:32 -05:00
|
|
|
.\" **************************************************************************
|
|
|
|
.\" * _ _ ____ _
|
|
|
|
.\" * Project ___| | | | _ \| |
|
|
|
|
.\" * / __| | | | |_) | |
|
|
|
|
.\" * | (__| |_| | _ <| |___
|
|
|
|
.\" * \___|\___/|_| \_\_____|
|
|
|
|
.\" *
|
2020-11-05 02:22:10 -05:00
|
|
|
.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
2011-03-11 18:14:32 -05:00
|
|
|
.\" *
|
|
|
|
.\" * This software is licensed as described in the file COPYING, which
|
|
|
|
.\" * you should have received as part of this distribution. The terms
|
2020-11-04 08:02:01 -05:00
|
|
|
.\" * are also available at https://curl.se/docs/copyright.html.
|
2011-03-11 18:14:32 -05:00
|
|
|
.\" *
|
|
|
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
.\" * copies of the Software, and permit persons to whom the Software is
|
|
|
|
.\" * furnished to do so, under the terms of the COPYING file.
|
|
|
|
.\" *
|
|
|
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
.\" * KIND, either express or implied.
|
|
|
|
.\" *
|
|
|
|
.\" **************************************************************************
|
2002-03-04 05:09:48 -05:00
|
|
|
.TH curl_slist_free_all 3 "5 March 2001" "libcurl 7.0" "libcurl Manual"
|
|
|
|
.SH NAME
|
|
|
|
curl_slist_free_all - free an entire curl_slist list
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B #include <curl/curl.h>
|
|
|
|
.sp
|
|
|
|
.BI "void curl_slist_free_all(struct curl_slist *" list);
|
|
|
|
.ad
|
|
|
|
.SH DESCRIPTION
|
|
|
|
curl_slist_free_all() removes all traces of a previously built curl_slist
|
|
|
|
linked list.
|
2018-08-09 10:37:39 -04:00
|
|
|
|
|
|
|
Passing in a NULL pointer in \fIlist\fP will make this function return
|
|
|
|
immediately with no action.
|
2002-03-04 05:09:48 -05:00
|
|
|
.SH RETURN VALUE
|
|
|
|
Nothing.
|
2017-05-05 09:51:25 -04:00
|
|
|
.SH EXAMPLE
|
|
|
|
.nf
|
|
|
|
CURL *handle;
|
|
|
|
struct curl_slist *slist=NULL;
|
|
|
|
|
|
|
|
slist = curl_slist_append(slist, "X-libcurl: coolness");
|
|
|
|
|
|
|
|
if (slist == NULL)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist);
|
|
|
|
|
|
|
|
curl_easy_perform(handle);
|
|
|
|
|
|
|
|
curl_slist_free_all(slist); /* free the list again */
|
|
|
|
.fi
|
2002-03-04 05:09:48 -05:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR curl_slist_append "(3), "
|