aboutsummaryrefslogtreecommitdiff
path: root/docs/libcurl/curl_formfree.3
diff options
context:
space:
mode:
Diffstat (limited to 'docs/libcurl/curl_formfree.3')
-rw-r--r--docs/libcurl/curl_formfree.322
1 files changed, 19 insertions, 3 deletions
diff --git a/docs/libcurl/curl_formfree.3 b/docs/libcurl/curl_formfree.3
index c027253eb..86639cc92 100644
--- a/docs/libcurl/curl_formfree.3
+++ b/docs/libcurl/curl_formfree.3
@@ -5,11 +5,11 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
.\" *
.\" * 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
@@ -19,7 +19,7 @@
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
-.TH curl_formfree 3 "August 09, 2018" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_formfree 3 "October 25, 2021" "libcurl 7.80.0" "libcurl Manual"
.SH NAME
curl_formfree - free a previously build multipart/formdata HTTP POST chain
@@ -44,6 +44,22 @@ the \fIcurl_formadd(3)\fP invoke(s).
Passing in a NULL pointer in \fIform\fP will make this function return
immediately with no action.
+.SH EXAMPLE
+.nf
+ /* Fill in a file upload field */
+ curl_formadd(&formpost,
+ &lastptr,
+ CURLFORM_COPYNAME, "file",
+ CURLFORM_FILE, "nice-image.jpg",
+ CURLFORM_END);
+
+ curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
+
+ curl_easy_perform(curl);
+
+ /* then cleanup the formpost chain */
+ curl_formfree(formpost);
+.fi
.SH AVAILABILITY
Deprecated in 7.56.0.
.SH RETURN VALUE