/curl/docs/examples/ |
H A D | pop3-ssl.c | 42 CURL *curl; in main() local 45 curl = curl_easy_init(); in main() 46 if(curl) { in main() 48 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); in main() 49 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); in main() 53 curl_easy_setopt(curl, CURLOPT_URL, "pop3s://pop.example.com/1"); in main() 64 curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); in main() 72 curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); in main() 78 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); in main() 81 res = curl_easy_perform(curl); in main() [all …]
|
H A D | keepalive.c | 33 CURL *curl; in main() local 36 curl = curl_easy_init(); in main() 37 if(curl) { in main() 39 curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L); in main() 42 curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 120L); in main() 45 curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 60L); in main() 48 curl_easy_setopt(curl, CURLOPT_TCP_KEEPCNT, 3L); in main() 50 curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/"); in main() 52 res = curl_easy_perform(curl); in main() 54 curl_easy_cleanup(curl); in main()
|
H A D | imap-store.c | 41 CURL *curl; in main() local 44 curl = curl_easy_init(); in main() 45 if(curl) { in main() 47 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); in main() 48 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); in main() 51 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX"); in main() 56 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "STORE 1 +Flags \\Deleted"); in main() 59 res = curl_easy_perform(curl); in main() 68 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXPUNGE"); in main() 71 res = curl_easy_perform(curl); in main() [all …]
|
H A D | cookie_interface.c | 38 print_cookies(CURL *curl) in print_cookies() argument 68 CURL *curl; in main() local 72 curl = curl_easy_init(); in main() 73 if(curl) { in main() 77 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); in main() 79 res = curl_easy_perform(curl); in main() 85 print_cookies(curl); in main() 90 print_cookies(curl); in main() 121 print_cookies(curl); in main() 123 res = curl_easy_perform(curl); in main() [all …]
|
H A D | pop3-noop.c | 41 CURL *curl; in main() local 44 curl = curl_easy_init(); in main() 45 if(curl) { in main() 47 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); in main() 48 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); in main() 51 curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com"); in main() 54 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "NOOP"); in main() 57 curl_easy_setopt(curl, CURLOPT_NOBODY, 1L); in main() 60 res = curl_easy_perform(curl); in main() 68 curl_easy_cleanup(curl); in main()
|
H A D | pop3-dele.c | 41 CURL *curl; in main() local 44 curl = curl_easy_init(); in main() 45 if(curl) { in main() 47 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); in main() 48 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); in main() 51 curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1"); in main() 54 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELE"); in main() 57 curl_easy_setopt(curl, CURLOPT_NOBODY, 1L); in main() 60 res = curl_easy_perform(curl); in main() 68 curl_easy_cleanup(curl); in main()
|
H A D | pop3-stat.c | 41 CURL *curl; in main() local 44 curl = curl_easy_init(); in main() 45 if(curl) { in main() 47 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); in main() 48 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); in main() 51 curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com"); in main() 54 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "STAT"); in main() 57 curl_easy_setopt(curl, CURLOPT_NOBODY, 1L); in main() 60 res = curl_easy_perform(curl); in main() 68 curl_easy_cleanup(curl); in main()
|
H A D | imap-authzid.c | 41 CURL *curl; in main() local 44 curl = curl_easy_init(); in main() 45 if(curl) { in main() 47 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); in main() 48 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); in main() 51 curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "shared-mailbox"); in main() 54 curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=PLAIN"); in main() 57 curl_easy_setopt(curl, CURLOPT_URL, in main() 61 res = curl_easy_perform(curl); in main() 69 curl_easy_cleanup(curl); in main()
|
H A D | pop3-authzid.c | 41 CURL *curl; in main() local 44 curl = curl_easy_init(); in main() 45 if(curl) { in main() 47 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); in main() 48 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); in main() 51 curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "shared-mailbox"); in main() 54 curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=PLAIN"); in main() 57 curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1"); in main() 60 res = curl_easy_perform(curl); in main() 68 curl_easy_cleanup(curl); in main()
|
H A D | fileupload.c | 35 CURL *curl; in main() local 49 curl = curl_easy_init(); in main() 50 if(curl) { in main() 52 curl_easy_setopt(curl, CURLOPT_URL, in main() 56 curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); in main() 59 curl_easy_setopt(curl, CURLOPT_READDATA, fd); in main() 62 curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, in main() 66 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); in main() 68 res = curl_easy_perform(curl); in main() 77 curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &total_time); in main() [all …]
|
/curl/tests/libtest/ |
H A D | lib547.c | 78 CURL *curl; in test() local 88 curl = curl_easy_init(); in test() 89 if(!curl) { in test() 95 test_setopt(curl, CURLOPT_URL, URL); in test() 96 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 97 test_setopt(curl, CURLOPT_HEADER, 1L); in test() 108 test_setopt(curl, CURLOPT_READDATA, &counter); in test() 113 test_setopt(curl, CURLOPT_POST, 1L); in test() 116 test_setopt(curl, CURLOPT_PROXYAUTH, in test() 119 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib1970.c | 30 CURL *curl; in test() local 40 curl = curl_easy_init(); in test() 41 if(!curl) { in test() 47 test_setopt(curl, CURLOPT_UPLOAD, 1L); in test() 48 test_setopt(curl, CURLOPT_INFILESIZE, 0L); in test() 49 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 51 test_setopt(curl, CURLOPT_USERPWD, "xxx"); in test() 52 test_setopt(curl, CURLOPT_HEADER, 0L); in test() 53 test_setopt(curl, CURLOPT_URL, URL); in test() 63 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib676.c | 31 CURL *curl; in test() local 38 curl = curl_easy_init(); in test() 39 if(!curl) { in test() 45 test_setopt(curl, CURLOPT_URL, URL); in test() 46 test_setopt(curl, CURLOPT_HEADER, 1L); in test() 48 test_setopt(curl, CURLOPT_COOKIEFILE, libtest_arg2); in test() 49 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 51 res = curl_easy_perform(curl); in test() 58 test_setopt(curl, CURLOPT_COOKIEFILE, NULL); in test() 60 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib569.c | 39 CURL *curl; in test() local 57 curl = curl_easy_init(); in test() 58 if(!curl) { in test() 66 test_setopt(curl, CURLOPT_WRITEDATA, stdout); in test() 67 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 69 test_setopt(curl, CURLOPT_URL, URL); in test() 72 res = curl_easy_perform(curl); in test() 92 test_setopt(curl, CURLOPT_RTSP_TRANSPORT, in test() 94 res = curl_easy_perform(curl); in test() 112 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib2305.c | 32 static void websocket_close(CURL *curl) in websocket_close() argument 41 static void websocket(CURL *curl) in websocket() argument 73 websocket_close(curl); in websocket() 78 CURL *curl; in test() local 83 curl = curl_easy_init(); in test() 84 if(curl) { in test() 85 curl_easy_setopt(curl, CURLOPT_URL, URL); in test() 93 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 95 res = curl_easy_perform(curl); in test() 98 websocket(curl); in test() [all …]
|
H A D | lib1533.c | 46 data->easy_handle = curl; in reset_data() 107 res = curl_easy_perform(curl); in perform_and_check_connections() 133 CURL *curl = NULL; in test() local 142 curl = curl_easy_init(); in test() 143 if(!curl) { in test() 149 reset_data(&data, curl); in test() 151 test_setopt(curl, CURLOPT_URL, URL); in test() 168 reset_data(&data, curl); in test() 179 reset_data(&data, curl); in test() 188 reset_data(&data, curl); in test() [all …]
|
H A D | lib539.c | 31 CURL *curl; in test() local 40 curl = curl_easy_init(); in test() 41 if(!curl) { in test() 50 test_setopt(curl, CURLOPT_URL, URL); in test() 51 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 54 res = curl_easy_perform(curl); in test() 67 curl_easy_cleanup(curl); in test() 72 test_setopt(curl, CURLOPT_URL, libtest_arg2); in test() 74 test_setopt(curl, CURLOPT_QUOTE, slist); in test() 76 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib519.c | 31 CURL *curl; in test() local 38 curl = curl_easy_init(); in test() 39 if(!curl) { in test() 45 test_setopt(curl, CURLOPT_URL, URL); in test() 46 test_setopt(curl, CURLOPT_USERPWD, "monster:underbed"); in test() 47 test_setopt(curl, CURLOPT_HEADER, 1L); in test() 48 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 51 res = curl_easy_perform(curl); in test() 55 test_setopt(curl, CURLOPT_USERPWD, "anothermonster:inwardrobe"); in test() 58 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib1975.c | 40 CURL *curl; in test() local 50 curl = curl_easy_init(); in test() 51 if(!curl) { in test() 57 test_setopt(curl, CURLOPT_UPLOAD, 1L); in test() 59 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 61 test_setopt(curl, CURLOPT_USERPWD, "xxx"); in test() 62 test_setopt(curl, CURLOPT_HEADER, 0L); in test() 63 test_setopt(curl, CURLOPT_URL, URL); in test() 69 test_setopt(curl, CURLOPT_HTTPHEADER, list); in test() 75 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib1971.c | 40 CURL *curl; in test() local 50 curl = curl_easy_init(); in test() 51 if(!curl) { in test() 57 test_setopt(curl, CURLOPT_UPLOAD, 1L); in test() 59 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 61 test_setopt(curl, CURLOPT_USERPWD, "xxx"); in test() 62 test_setopt(curl, CURLOPT_HEADER, 0L); in test() 63 test_setopt(curl, CURLOPT_URL, URL); in test() 67 test_setopt(curl, CURLOPT_HTTPHEADER, list); in test() 73 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib1528.c | 31 CURL *curl = NULL; in test() local 42 curl = curl_easy_init(); in test() 43 if(!curl) { in test() 56 test_setopt(curl, CURLOPT_URL, URL); in test() 57 test_setopt(curl, CURLOPT_PROXY, libtest_arg2); in test() 58 test_setopt(curl, CURLOPT_HTTPHEADER, hhl); in test() 59 test_setopt(curl, CURLOPT_PROXYHEADER, phl); in test() 61 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 63 test_setopt(curl, CURLOPT_HEADER, 1L); in test() 65 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib1973.c | 30 CURL *curl; in test() local 40 curl = curl_easy_init(); in test() 41 if(!curl) { in test() 48 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 50 test_setopt(curl, CURLOPT_USERPWD, "xxx"); in test() 51 test_setopt(curl, CURLOPT_HEADER, 0L); in test() 52 test_setopt(curl, CURLOPT_URL, URL); in test() 56 test_setopt(curl, CURLOPT_HTTPHEADER, list); in test() 60 test_setopt(curl, CURLOPT_CONNECT_TO, connect_to); in test() 62 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib513.c | 39 CURL *curl; in test() local 47 curl = curl_easy_init(); in test() 48 if(!curl) { in test() 55 test_setopt(curl, CURLOPT_URL, URL); in test() 58 test_setopt(curl, CURLOPT_POST, 1L); in test() 61 test_setopt(curl, CURLOPT_POSTFIELDSIZE, 1L); in test() 67 test_setopt(curl, CURLOPT_READDATA, NULL); in test() 70 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 73 test_setopt(curl, CURLOPT_HEADER, 1L); in test() 76 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib589.c | 30 CURL *curl; in test() local 38 curl = curl_easy_init(); in test() 39 if(!curl) { in test() 46 test_setopt(curl, CURLOPT_URL, URL); in test() 48 test_setopt(curl, CURLOPT_HEADER, 1L); /* include header */ in test() 52 curl_mime *mime = curl_mime_init(curl); in test() 56 test_setopt(curl, CURLOPT_MIMEPOST, mime); in test() 57 res = curl_easy_perform(curl); in test() 64 test_setopt(curl, CURLOPT_MIMEPOST, NULL); in test() 67 res = curl_easy_perform(curl); in test() [all …]
|
/curl/tests/http/clients/ |
H A D | ws-pingpong.c | 88 static void websocket_close(CURL *curl) in websocket_close() argument 102 res = ping(curl, payload); in pingpong() 107 res = recv_pong(curl, payload); in pingpong() 116 websocket_close(curl); in pingpong() 119 websocket_close(curl); in pingpong() 128 CURL *curl; in main() local 141 curl = curl_easy_init(); in main() 142 if(curl) { in main() 149 res = curl_easy_perform(curl); in main() 152 res = pingpong(curl, payload); in main() [all …]
|