Imported Upstream version 7.59.0
[platform/upstream/curl.git] / docs / libcurl / curl_slist_free_all.3
1 .\" **************************************************************************
2 .\" *                                  _   _ ____  _
3 .\" *  Project                     ___| | | |  _ \| |
4 .\" *                             / __| | | | |_) | |
5 .\" *                            | (__| |_| |  _ <| |___
6 .\" *                             \___|\___/|_| \_\_____|
7 .\" *
8 .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, 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 "May 05, 2017" "libcurl 7.59.0" "libcurl Manual"
23
24 .SH NAME
25 curl_slist_free_all - free an entire curl_slist list
26 .SH SYNOPSIS
27 .B #include <curl/curl.h>
28 .sp
29 .BI "void curl_slist_free_all(struct curl_slist *" list);
30 .ad
31 .SH DESCRIPTION
32 curl_slist_free_all() removes all traces of a previously built curl_slist
33 linked list.
34 .SH RETURN VALUE
35 Nothing.
36 .SH EXAMPLE
37 .nf
38 CURL *handle;
39 struct curl_slist *slist=NULL;
40
41 slist = curl_slist_append(slist, "X-libcurl: coolness");
42
43 if (slist == NULL)
44   return -1;
45
46 curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist);
47
48 curl_easy_perform(handle);
49
50 curl_slist_free_all(slist); /* free the list again */
51 .fi
52 .SH "SEE ALSO"
53 .BR curl_slist_append "(3), "
54