mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:03:36 +03:00
docs/examples: avoid deprecated options in examples where possible
Example programs targeting a deprecated feature/option are commented with a warning about it. Other examples are adapted to not use deprecated options. Closes #9661
This commit is contained in:
parent
28687ae271
commit
83de62babc
4 changed files with 40 additions and 46 deletions
|
|
@ -26,6 +26,11 @@
|
|||
* </DESC>
|
||||
*/
|
||||
|
||||
/*
|
||||
* Warning: this example uses the deprecated form api. See "multi-post.c"
|
||||
* for a similar example using the mime api.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
|
|
@ -49,14 +54,14 @@ int main(void)
|
|||
curl_formadd(&formpost,
|
||||
&lastptr,
|
||||
CURLFORM_COPYNAME, "sendfile",
|
||||
CURLFORM_FILE, "postit2.c",
|
||||
CURLFORM_FILE, "multi-formadd.c",
|
||||
CURLFORM_END);
|
||||
|
||||
/* Fill in the filename field */
|
||||
curl_formadd(&formpost,
|
||||
&lastptr,
|
||||
CURLFORM_COPYNAME, "filename",
|
||||
CURLFORM_COPYCONTENTS, "postit2.c",
|
||||
CURLFORM_COPYCONTENTS, "multi-formadd.c",
|
||||
CURLFORM_END);
|
||||
|
||||
/* Fill in the submit field too, even if this is rarely needed */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue