gnurl_mime_name(3)
π gnurl_mime_name(3) π
okay so bestie, this page is from the libgnurl Manual and we're here to talk about giving a mime part a name β it's giving form-field energy, no cap β¨
π NAME π
curl_mime_name(3) β set a mime part's name. This is literally the way HTTP form fields get named, iykyk.
β¨ SYNOPSIS β¨
the exact include and signature go like this:
#include <gnurl/curl.h>
CURLcode curl_mime_name(curl_mimepart * part, const char * name);
πΈ DESCRIPTION πΈ
curl_mime_name(3) sets a mime part's name, and that's the whole main-character move: this is how HTTP form fields are named.
part is the part's handle to assign a name to.
name points to the null-terminated name string.
The name string is copied into the part, so the associated storage may safely be released or reused after the call. no cap, you don't have to keep it alive. Setting a part's name twice is valid: only the value set by the last call is retained. It is possible to βunnameβ a part by setting name to NULL.
π¦ AVAILABILITY π¦
As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0.
π RETURN VALUE π
CURLE_OK or a CURL error code upon failure.
π₯ EXAMPLE π₯
here's the exact lil demo, keep it verbatim bestie:
curl_mime *mime;
curl_mimepart *part;
/* create a mime handle */
mime = curl_mime_init(easy);
/* add a part */
part = curl_mime_addpart(mime);
/* give the part a name */
curl_mime_name(part, "shoe_size");
π SEE ALSO π
go snoop these besties:
mwah π this page lives in the libgnurl Manual, and the footer says libcurl 7.56.0 / 22 August 2017. bye bestie, go name those parts π«Άβ¨
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2020, 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