CURLOPT_MIMEPOST.3 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2021, 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.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. .\"
  23. .TH CURLOPT_MIMEPOST 3 "22 Aug 2017" "libcurl 7.56.0" "curl_easy_setopt options"
  24. .SH NAME
  25. CURLOPT_MIMEPOST \- send data from mime structure
  26. .SH SYNOPSIS
  27. .nf
  28. #include <curl/curl.h>
  29. curl_mime *mime;
  30. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MIMEPOST, mime);
  31. .SH DESCRIPTION
  32. Pass a mime handle previously obtained from \fIcurl_mime_init(3)\fP.
  33. This setting is supported by the HTTP protocol to post forms and by the
  34. SMTP and IMAP protocols to provide the email data to send/upload.
  35. This option is the preferred way of posting an HTTP form, replacing and
  36. extending the deprecated \fICURLOPT_HTTPPOST(3)\fP option.
  37. .SH PROTOCOLS
  38. HTTP, SMTP, IMAP.
  39. .SH EXAMPLE
  40. Using this option implies the use of several mime structure building
  41. functions: see https://curl.se/libcurl/c/smtp-mime.html for a complete
  42. example.
  43. .SH AVAILABILITY
  44. Added in 7.56.0
  45. .SH RETURN VALUE
  46. This will return CURLE_OK.
  47. .SH "SEE ALSO"
  48. .BR curl_mime_init "(3)"