Commit ce0881ed authored by Patrick Monnerat's avatar Patrick Monnerat
Browse files

mime: new MIME API.

Available in HTTP, SMTP and IMAP.
Deprecates the FORM API.
See CURLOPT_MIMEPOST.
Lib code and associated documentation.
parent 5bae7273
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -17,4 +17,8 @@ man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3 \
  curl_multi_timeout.3 curl_formget.3 curl_multi_assign.3                \
  curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3                    \
  curl_multi_socket_action.3 curl_multi_wait.3 libcurl-symbols.3         \
  libcurl-thread.3 curl_multi_socket_all.3 curl_global_sslset.3
  libcurl-thread.3 curl_multi_socket_all.3 curl_global_sslset.3          \
  curl_mime_init.3 curl_mime_free.3 curl_mime_addpart.3 curl_mime_name.3 \
  curl_mime_data.3 curl_mime_data_cb.3 curl_mime_filedata.3              \
  curl_mime_filename.3 curl_mime_subparts.3                              \
  curl_mime_type.3 curl_mime_headers.3
+2 −0
Original line number Diff line number Diff line
@@ -411,6 +411,8 @@ Size of file to send. \fICURLOPT_INFILESIZE(3)\fP
Size of file to send. \fICURLOPT_INFILESIZE_LARGE(3)\fP
.IP CURLOPT_UPLOAD
Upload data. See \fICURLOPT_UPLOAD(3)\fP
.IP CURLOPT_MIMEPOST
Post/send MIME data. See \fICURLOPT_MIMEPOST(3)\fP
.IP CURLOPT_MAXFILESIZE
Maximum file size to get. See \fICURLOPT_MAXFILESIZE(3)\fP
.IP CURLOPT_MAXFILESIZE_LARGE
+8 −3
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2017, 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
@@ -29,6 +29,8 @@ curl_formadd - add a section to a multipart/formdata HTTP POST
.BI "struct curl_httppost ** " lastitem, " ...);"
.ad
.SH DESCRIPTION
This function is deprecated. Do not use! See \fIcurl_mime_init(3)\fP instead!

curl_formadd() is used to append sections when building a multipart/formdata
HTTP POST (sometimes referred to as RFC2388-style posts). Append one section
at a time until you've added all the sections you want included and then you
@@ -169,6 +171,8 @@ the \fICURLOPT_HTTPPOST(3)\fP option), you must not free the list until after
you've called \fIcurl_easy_cleanup(3)\fP for the curl handle.

See example below.
.SH AVAILABILITY
Deprecated in 7.56.0.
.SH RETURN VALUE
0 means everything was ok, non-zero means an error occurred corresponding
to a CURL_FORMADD_* constant defined in
@@ -255,4 +259,5 @@ to a CURL_FORMADD_* constant defined in

.SH "SEE ALSO"
.BR curl_easy_setopt "(3),"
.BR curl_formfree "(3)"
.BR curl_formfree "(3),"
.BR curl_mime_init "(3)"
+6 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2017, 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
@@ -28,6 +28,8 @@ curl_formfree - free a previously build multipart/formdata HTTP POST chain
.BI "void curl_formfree(struct curl_httppost *" form);
.ad
.SH DESCRIPTION
This function is deprecated. Do not use! See \fIcurl_mime_init(3)\fP instead!

curl_formfree() is used to clean up data previously built/appended with
\fIcurl_formadd(3)\fP. This must be called when the data has been used, which
typically means after \fIcurl_easy_perform(3)\fP has been called.
@@ -38,7 +40,9 @@ the \fIcurl_formadd(3)\fP invoke(s).

\fBform\fP is the pointer as returned from a previous call to
\fIcurl_formadd(3)\fP and may be NULL.
.SH AVAILABILITY
Deprecated in 7.56.0.
.SH RETURN VALUE
None
.SH "SEE ALSO"
.BR curl_formadd "(3) "
.BR curl_formadd "(3), " curl_mime_init "(3), " curl_mime_free "(3)"
+4 −3
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2017, 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
@@ -65,6 +65,7 @@ request as only then will libcurl get the actual read callback to use!
   return total_size;
 }
.SH AVAILABILITY
This function was added in libcurl 7.15.5
This function was added in libcurl 7.15.5. The form API is deprecated in
libcurl 7.56.0.
.SH "SEE ALSO"
.BR curl_formadd "(3) "
.BR curl_formadd "(3), " curl_mime_init "(3)"
Loading