/external/curl/docs/examples/ |
H A D | getinfo.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 27 CURL *curl; local 30 /* http://curl.haxx.se/libcurl/c/curl_easy_init.html */ 31 curl = curl_easy_init(); 32 if(curl) { 33 /* http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTURL */ 34 curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/"); 35 /* http://curl [all...] |
H A D | http-post.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 27 CURL *curl; local 33 /* get a curl handle */ 34 curl = curl_easy_init(); 35 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_URL, "http://postit.example.com/moo.cgi"); 41 curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=daniel&project=curl"); [all...] |
H A D | httpcustomheader.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 27 CURL *curl; local 30 curl = curl_easy_init(); 31 if(curl) { 34 /* Remove a header curl would otherwise add by itself */ 40 /* Modify a header curl otherwise adds differently */ 44 we're then using a semicolon in the string we pass to curl! */ 48 res = curl_easy_setopt(curl, CURLOPT_HTTPHEADE [all...] |
H A D | https.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 27 CURL *curl; local 32 curl = curl_easy_init(); 33 if(curl) { 34 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 47 curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); 57 curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); 61 res = curl_easy_perform(curl); [all...] |
H A D | imap-copy.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX"); 46 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUES [all...] |
H A D | imap-create.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com"); 46 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUES [all...] |
H A D | imap-delete.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com"); 46 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUES [all...] |
H A D | imap-examine.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com"); 46 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUES [all...] |
H A D | imap-fetch.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1"); 46 res = curl_easy_perform(curl); [all...] |
H A D | imap-list.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 45 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com"); 48 res = curl_easy_perform(curl); [all...] |
H A D | imap-lsub.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com"); 47 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUES [all...] |
H A D | imap-noop.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com"); 46 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUES [all...] |
H A D | imap-search.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX"); 50 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUES [all...] |
H A D | imap-ssl.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 34 CURL *curl; local 37 curl = curl_easy_init(); 38 if(curl) { 40 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 41 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 45 curl_easy_setopt(curl, CURLOPT_URL, "imaps://imap.example.com/INBOX/;UID=1"); 56 curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEE [all...] |
H A D | imap-store.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX"); 48 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUES [all...] |
H A D | imap-tls.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 34 CURL *curl; local 37 curl = curl_easy_init(); 38 if(curl) { 40 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 41 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 44 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1"); 51 curl_easy_setopt(curl, CURLOPT_USE_SS [all...] |
H A D | persistant.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 24 #include <curl/curl.h> 28 CURL *curl; local 33 curl = curl_easy_init(); 34 if(curl) { 35 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); 36 curl_easy_setopt(curl, CURLOPT_HEADER, 1L); 39 curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/"); 42 res = curl_easy_perform(curl); [all...] |
H A D | pop3-dele.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1"); 46 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUES [all...] |
H A D | pop3-list.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com"); 46 res = curl_easy_perform(curl); [all...] |
H A D | pop3-noop.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com"); 46 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUES [all...] |
H A D | pop3-retr.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1"); 46 res = curl_easy_perform(curl); [all...] |
H A D | pop3-ssl.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 34 CURL *curl; local 37 curl = curl_easy_init(); 38 if(curl) { 40 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 41 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 45 curl_easy_setopt(curl, CURLOPT_URL, "pop3s://pop.example.com/1"); 56 curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEE [all...] |
H A D | pop3-stat.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com"); 46 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUES [all...] |
H A D | pop3-tls.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 34 CURL *curl; local 37 curl = curl_easy_init(); 38 if(curl) { 40 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 41 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 44 curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1"); 51 curl_easy_setopt(curl, CURLOPT_USE_SS [all...] |
H A D | pop3-top.c | 12 * are also available at http://curl.haxx.se/docs/copyright.html. 23 #include <curl/curl.h> 33 CURL *curl; local 36 curl = curl_easy_init(); 37 if(curl) { 39 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 40 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 43 curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com"); 46 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUES [all...] |