GNURLOPT_MIMEPOST(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

πŸ’… GNURLOPT_MIMEPOST(3) πŸ’…

okay so this is the GNURLOPT_MIMEPOST(3) page from the curl_easy_setopt options manual β€” and yes bestie, we're getting into mime posting. 🌸


✨ NAME ✨

  • CURLOPT_MIMEPOST β€” set post/send data from mime structure πŸ’Œ

πŸŽ€ SYNOPSIS πŸŽ€

#include <gnurl/curl.h>

curl_mime *mime;

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MIMEPOST, mime);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so picture this: you pass in a mime handle that you previously got from curl_mime_init(3). That's the whole vibe, no cap. ✨

This setting is supported by the HTTP protocol to post forms, and by the SMTP and IMAP protocols to provide the e-mail data to send/upload. πŸ’Œ

This option is the preferred way of posting an HTTP form, replacing and extending the deprecated CURLOPT_HTTPPOST(3) option. Deprecated is the key word there, bestie. πŸ’…

🌈 PROTOCOLS 🌈

HTTP, SMTP, IMAP. That's the trio, highkey. πŸ‘‘

⭐ AVAILABILITY ⭐

Since 7.56.0. πŸŽ€

πŸ”₯ RETURN VALUE πŸ”₯

This will return CURLE_OK β€” lowkey iconic. βœ…

πŸ’– EXAMPLE πŸ’–

Using this option implies the use of several mime structure building functions: see https://curl.haxx.se/libcurl/c/smtp-mime.html for a complete example. πŸ“¬

🫢 SEE ALSO 🫢


mwah πŸ’‹ β€” this page is libcurl 7.56.0, dated 22 Aug 2017, and it's literally GNURLOPT_MIMEPOST(3) signing off. πŸ§šπŸ’œ

πŸ“¦ where this page comes from