curl_mime_addpart(3)
π curl_mime_addpart(3) π
okay so bestie, this page is from the Library Functions Manual, and it is literally about adding a brand-new empty part to your mime situation π
β¨ NAME β¨
curl_mime_addpart β append a new empty part to a mime structure π«Ά
πΈ SYNOPSIS πΈ
#include <curl/curl.h>
curl_mimepart *curl_mime_addpart(curl_mime *mime);
π DESCRIPTION π
curl_mime_addpart(3) creates and appends a new empty part to the given mime structure and returns a handle to it. The returned part handle can subsequently be populated using functions from the mime API. slay β¨
mime is the handle of the mime structure in which the new part must be appended. yes bestie, that is the whole assignment π
π¦ PROTOCOLS π¦
This functionality affects http, imap and smtp π
π EXAMPLE π
here is the example, served fresh and unchanged π
int main(void)
{
curl_mime *mime;
curl_mimepart *part;
CURL *curl = curl_easy_init();
if(curl) {
/* create a mime handle */
mime = curl_mime_init(curl);
/* add a part */
part = curl_mime_addpart(mime);
/* continue and set name + data to the part */
curl_mime_data(part, "This is the field data", CURL_ZERO_TERMINATED);
curl_mime_name(part, "data");
}
}
π§ AVAILABILITY π§
Added in curl 7.56.0 β
π RETURN VALUE π
A mime part structure handle, or NULL upon failure. and that is the tea β
π₯ SEE ALSO π₯
curl_mime_data(3)curl_mime_data_cb(3)curl_mime_encoder(3)curl_mime_filedata(3)curl_mime_filename(3)curl_mime_headers(3)curl_mime_init(3)curl_mime_name(3)curl_mime_subparts(3)curl_mime_type(3)
mwah π this iconic little page comes from libcurl, dated 2026-10-12, under the manual name curl_mime_addpart(3) β periodt πβ¨
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms