aboutsummaryrefslogtreecommitdiff
path: root/docs/examples
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples')
-rw-r--r--docs/examples/cacertinmem.c2
-rw-r--r--docs/examples/ftpgetresp.c2
-rw-r--r--docs/examples/rtsp.c2
-rw-r--r--docs/examples/sepheaders.c2
-rw-r--r--docs/examples/simplessl.c2
-rw-r--r--docs/examples/url2file.c5
-rw-r--r--docs/examples/usercertinmem.c2
7 files changed, 8 insertions, 9 deletions
diff --git a/docs/examples/cacertinmem.c b/docs/examples/cacertinmem.c
index b660c0d87..30a5153a8 100644
--- a/docs/examples/cacertinmem.c
+++ b/docs/examples/cacertinmem.c
@@ -125,7 +125,7 @@ int main(void)
rv=curl_easy_setopt(ch,CURLOPT_WRITEFUNCTION, *writefunction);
rv=curl_easy_setopt(ch,CURLOPT_WRITEDATA, stdout);
rv=curl_easy_setopt(ch,CURLOPT_HEADERFUNCTION, *writefunction);
- rv=curl_easy_setopt(ch,CURLOPT_WRITEHEADER, stderr);
+ rv=curl_easy_setopt(ch,CURLOPT_HEADERDATA, stderr);
rv=curl_easy_setopt(ch,CURLOPT_SSLCERTTYPE,"PEM");
rv=curl_easy_setopt(ch,CURLOPT_SSL_VERIFYPEER,1L);
rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
diff --git a/docs/examples/ftpgetresp.c b/docs/examples/ftpgetresp.c
index db96a3a13..dcb296adf 100644
--- a/docs/examples/ftpgetresp.c
+++ b/docs/examples/ftpgetresp.c
@@ -58,7 +58,7 @@ int main(void)
/* If you intend to use this on windows with a libcurl DLL, you must use
CURLOPT_WRITEFUNCTION as well */
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);
- curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile);
+ curl_easy_setopt(curl, CURLOPT_HEADERDATA, respfile);
res = curl_easy_perform(curl);
/* Check for errors */
if(res != CURLE_OK)
diff --git a/docs/examples/rtsp.c b/docs/examples/rtsp.c
index 669780a9b..fed343dfd 100644
--- a/docs/examples/rtsp.c
+++ b/docs/examples/rtsp.c
@@ -224,7 +224,7 @@ int main(int argc, char * const argv[])
if (curl != NULL) {
my_curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
my_curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
- my_curl_easy_setopt(curl, CURLOPT_WRITEHEADER, stdout);
+ my_curl_easy_setopt(curl, CURLOPT_HEADERDATA, stdout);
my_curl_easy_setopt(curl, CURLOPT_URL, url);
/* request server options */
diff --git a/docs/examples/sepheaders.c b/docs/examples/sepheaders.c
index d944ab99d..63ea99391 100644
--- a/docs/examples/sepheaders.c
+++ b/docs/examples/sepheaders.c
@@ -66,7 +66,7 @@ int main(void)
}
/* we want the headers be written to this file handle */
- curl_easy_setopt(curl_handle, CURLOPT_WRITEHEADER, headerfile);
+ curl_easy_setopt(curl_handle, CURLOPT_HEADERDATA, headerfile);
/* we want the body be written to this file handle instead of stdout */
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, bodyfile);
diff --git a/docs/examples/simplessl.c b/docs/examples/simplessl.c
index 74c58461a..aefb79f62 100644
--- a/docs/examples/simplessl.c
+++ b/docs/examples/simplessl.c
@@ -75,7 +75,7 @@ int main(void)
if(curl) {
/* what call to write: */
curl_easy_setopt(curl, CURLOPT_URL, "HTTPS://your.favourite.ssl.site");
- curl_easy_setopt(curl, CURLOPT_WRITEHEADER, headerfile);
+ curl_easy_setopt(curl, CURLOPT_HEADERDATA, headerfile);
for(i = 0; i < 1; i++) /* single-iteration loop, just to break out from */
{
diff --git a/docs/examples/url2file.c b/docs/examples/url2file.c
index 64d27c88f..adf696c9a 100644
--- a/docs/examples/url2file.c
+++ b/docs/examples/url2file.c
@@ -63,9 +63,8 @@ int main(int argc, char *argv[])
pagefile = fopen(pagefilename, "wb");
if (pagefile) {
- /* write the page body to this file handle. CURLOPT_FILE is also known as
- CURLOPT_WRITEDATA*/
- curl_easy_setopt(curl_handle, CURLOPT_FILE, pagefile);
+ /* write the page body to this file handle */
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, pagefile);
/* get it! */
curl_easy_perform(curl_handle);
diff --git a/docs/examples/usercertinmem.c b/docs/examples/usercertinmem.c
index 36c1c9064..dd56c6167 100644
--- a/docs/examples/usercertinmem.c
+++ b/docs/examples/usercertinmem.c
@@ -184,7 +184,7 @@ int main(void)
rv = curl_easy_setopt(ch,CURLOPT_WRITEFUNCTION, *writefunction);
rv = curl_easy_setopt(ch,CURLOPT_WRITEDATA, stdout);
rv = curl_easy_setopt(ch,CURLOPT_HEADERFUNCTION, *writefunction);
- rv = curl_easy_setopt(ch,CURLOPT_WRITEHEADER, stderr);
+ rv = curl_easy_setopt(ch,CURLOPT_HEADERDATA, stderr);
rv = curl_easy_setopt(ch,CURLOPT_SSLCERTTYPE,"PEM");
/* both VERIFYPEER and VERIFYHOST are set to 0 in this case because there is