gnurl_mime_addpart(3)
β¨ bestie, you're reading the libgnurl manual page for gnurl_mime_addpart(3) β¨
πΈ NAME πΈ
curl_mime_addpart β append a new empty part to a mime structure
π¦ SYNOPSIS π¦
#include <gnurl/curl.h>
curl_mimepart * curl_mime_addpart(curl_mime * mime);
π DESCRIPTION π
Okay so 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. That's the whole vibe check π
π AVAILABILITY π
As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0. Periodt.
π₯ RETURN VALUE π₯
A mime part structure handle, or NULL upon failure. No cap.
π§ EXAMPLE π§
curl_mime *mime;
curl_mimepart *part;
/* create a mime handle */
mime = curl_mime_init(easy);
/* 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");
π SEE ALSO π
curl_mime_init(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)curl_mime_encoder(3)
xoxo, your libgnurl bestie π this iconic page comes from libcurl 7.56.0, dated 22 August 2017, and it's literally gnurl_mime_addpart(3) π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms