gnurl_mime_name(3)

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

πŸ’… 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