Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl_formadd.3: bolden the deprecation notice #9637

Closed
wants to merge 1 commit into from

Conversation

jay
Copy link
Member

@jay jay commented Oct 3, 2022

Ref: #9621

Closes #xxxx


/cc @monnerat

@monnerat
Copy link
Contributor

monnerat commented Oct 3, 2022

Thanks, this goes in the good direction. Maybe do the same boldening in CURLOPT_HTTPPOST.3 too ?

@bagder
Copy link
Member

bagder commented Oct 4, 2022

And move the note to the top of the description I think.

@jay
Copy link
Member Author

jay commented Oct 5, 2022

Done, please give it another look.

IMO CURLOPT_MIMEPOST should have an inline HTTP example instead of just referring to the SMTP MIME example code. The example could be copied from libcurl-tutorial,

The following example sets two simple text parts with plain textual contents,
and then a file with binary contents and uploads the whole thing.
.nf
curl_mime *multipart = curl_mime_init(easyhandle);
curl_mimepart *part = curl_mime_addpart(multipart);
curl_mime_name(part, "name");
curl_mime_data(part, "daniel", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(multipart);
curl_mime_name(part, "project");
curl_mime_data(part, "curl", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(multipart);
curl_mime_name(part, "logotype-image");
curl_mime_filedata(part, "curl.png");
/* Set the form info */
curl_easy_setopt(easyhandle, CURLOPT_MIMEPOST, multipart);
curl_easy_perform(easyhandle); /* post away! */
/* free the post data again */
curl_mime_free(multipart);
.fi

@bagder
Copy link
Member

bagder commented Oct 5, 2022

IMO CURLOPT_MIMEPOST should have an inline HTTP example

Yes, all man pages should have inline examples!

bagder added a commit that referenced this pull request Oct 5, 2022
bagder added a commit that referenced this pull request Oct 5, 2022
@jay jay closed this in eada290 Oct 5, 2022
@jay jay deleted the formadd_bolden branch October 5, 2022 22:47
jquepi pushed a commit to jquepi/curl.1.555 that referenced this pull request Oct 24, 2022
jquepi pushed a commit to jquepi/curl.1.555 that referenced this pull request Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants