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