1curl_mime_name(3)               libcurl Manual               curl_mime_name(3)
2
3
4

NAME

6       curl_mime_name - set a mime part's name
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_mime_name(curl_mimepart * part, const char * name);
12

DESCRIPTION

14       curl_mime_name(3)  sets  a  mime part's name. This is the way HTTP form
15       fields are named.
16
17       part is the part's handle to assign a name to.
18
19       name points to the null-terminated name string.
20
21       The name string is copied into the part, thus  the  associated  storage
22       may  safely  be  released  or  reused after call. Setting a part's name
23       twice is valid: only the value set by the last call is retained. It  is
24       possible to "unname" a part by setting name to NULL.
25

AVAILABILITY

27       As  long  as  at  least  one of HTTP, SMTP or IMAP is enabled. Added in
28       7.56.0.
29

RETURN VALUE

31       CURLE_OK or a CURL error code upon failure.
32

EXAMPLE

34        curl_mime *mime;
35        curl_mimepart *part;
36
37        /* create a mime handle */
38        mime = curl_mime_init(easy);
39
40        /* add a part */
41        part = curl_mime_addpart(mime);
42
43        /* give the part a name */
44        curl_mime_name(part, "shoe_size");
45

SEE ALSO

47       curl_mime_addpart(3), curl_mime_data(3), curl_mime_type(3)
48
49
50
51libcurl 7.79.1                 November 04, 2020             curl_mime_name(3)
Impressum