/curl/tests/libtest/ |
H A D | lib1507.c | 53 CURL *curl = NULL; in test() local 61 easy_init(curl); in test() 70 curl_easy_setopt(curl, CURLOPT_URL, URL); in test() 72 curl_easy_setopt(curl, CURLOPT_USERNAME, USERNAME); in test() 73 curl_easy_setopt(curl, CURLOPT_PASSWORD, PASSWORD); in test() 75 curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); in test() 77 curl_easy_setopt(curl, CURLOPT_MAIL_FROM, MAILFROM); in test() 79 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 80 multi_add_handle(mcurl, curl); in test() 146 curl_multi_remove_handle(mcurl, curl); in test() [all …]
|
H A D | lib2402.c | 37 CURL *curl[NUM_HANDLES] = {0}; in test() local 69 easy_init(curl[i]); in test() 75 easy_setopt(curl[i], CURLOPT_URL, target_url); in test() 79 easy_setopt(curl[i], CURLOPT_SSL_VERIFYPEER, 0L); in test() 82 easy_setopt(curl[i], CURLOPT_PIPEWAIT, 1L); in test() 84 easy_setopt(curl[i], CURLOPT_VERBOSE, 1L); in test() 86 easy_setopt(curl[i], CURLOPT_HEADER, 1L); in test() 88 easy_setopt(curl[i], CURLOPT_RESOLVE, slist); in test() 95 multi_add_handle(m, curl[i]); in test() 132 curl_multi_remove_handle(m, curl[i]); in test() [all …]
|
H A D | libprereq.c | 58 CURL *curl = NULL; in test() local 64 curl = curl_easy_init(); in test() 66 if(curl) { in test() 76 curl_easy_setopt(curl, CURLOPT_URL, URL); in test() 77 curl_easy_setopt(curl, CURLOPT_PREREQFUNCTION, prereq_callback); in test() 78 curl_easy_setopt(curl, CURLOPT_PREREQDATA, &prereq_cb); in test() 79 curl_easy_setopt(curl, CURLOPT_WRITEDATA, stderr); in test() 83 curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); in test() 86 ret = curl_easy_perform(curl); in test() 95 curl_easy_cleanup(curl); in test()
|
H A D | lib541.c | 38 CURL *curl; in test() local 81 curl = curl_easy_init(); in test() 82 if(!curl) { in test() 90 test_setopt(curl, CURLOPT_UPLOAD, 1L); in test() 93 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 96 test_setopt(curl, CURLOPT_URL, URL); in test() 99 test_setopt(curl, CURLOPT_READDATA, hd_src); in test() 102 res = curl_easy_perform(curl); in test() 108 res = curl_easy_perform(curl); in test() 115 curl_easy_cleanup(curl); in test()
|
H A D | lib655.c | 63 CURL *curl; in test() local 70 curl = curl_easy_init(); in test() 71 if(!curl) { in test() 78 test_setopt(curl, CURLOPT_URL, URL); in test() 80 test_setopt(curl, CURLOPT_RESOLVER_START_DATA, TEST_DATA_STRING); in test() 81 test_setopt(curl, CURLOPT_RESOLVER_START_FUNCTION, resolver_alloc_cb_fail); in test() 84 res = curl_easy_perform(curl); in test() 93 test_setopt(curl, CURLOPT_RESOLVER_START_FUNCTION, resolver_alloc_cb_pass); in test() 96 res = curl_easy_perform(curl); in test() 110 curl_easy_cleanup(curl); in test()
|
H A D | lib1512.c | 40 CURL *curl[NUM_HANDLES] = {NULL, NULL}; in test() local 62 easy_init(curl[i]); in test() 68 easy_setopt(curl[i], CURLOPT_URL, target_url); in test() 70 easy_setopt(curl[i], CURLOPT_VERBOSE, 1L); in test() 72 easy_setopt(curl[i], CURLOPT_HEADER, 1L); in test() 75 easy_setopt(curl[i], CURLOPT_DNS_USE_GLOBAL_CACHE, 1L); in test() 80 easy_setopt(curl[0], CURLOPT_RESOLVE, slist); in test() 84 res = curl_easy_perform(curl[i]); in test() 91 curl_easy_cleanup(curl[0]); in test() 92 curl_easy_cleanup(curl[1]); in test()
|
H A D | lib1591.c | 78 CURL *curl = NULL; in test() local 89 curl = curl_easy_init(); in test() 90 if(!curl) { in test() 102 test_setopt(curl, CURLOPT_URL, URL); in test() 103 test_setopt(curl, CURLOPT_HTTPHEADER, hhl); in test() 104 test_setopt(curl, CURLOPT_UPLOAD, 1L); in test() 105 test_setopt(curl, CURLOPT_READFUNCTION, read_callback); in test() 106 test_setopt(curl, CURLOPT_TRAILERFUNCTION, trailers_callback); in test() 107 test_setopt(curl, CURLOPT_TRAILERDATA, NULL); in test() 109 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib651.c | 32 CURL *curl; in test() local 63 curl = curl_easy_init(); in test() 64 if(!curl) { in test() 74 test_setopt(curl, CURLOPT_URL, URL); in test() 78 test_setopt(curl, CURLOPT_HTTPPOST, formpost); in test() 82 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 85 test_setopt(curl, CURLOPT_HEADER, 1L); in test() 88 res = curl_easy_perform(curl); in test() 93 curl_easy_cleanup(curl); in test()
|
H A D | lib1510.c | 37 CURL *curl = NULL; in test() local 65 easy_init(curl); in test() 68 easy_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 70 easy_setopt(curl, CURLOPT_HEADER, 1L); in test() 72 easy_setopt(curl, CURLOPT_RESOLVE, slist); in test() 74 easy_setopt(curl, CURLOPT_MAXCONNECTS, 3L); in test() 83 easy_setopt(curl, CURLOPT_URL, target_url); in test() 85 res = curl_easy_perform(curl); in test() 96 curl_easy_cleanup(curl); in test()
|
H A D | lib677.c | 36 CURL *curl = NULL; in test() local 46 easy_init(curl); in test() 48 easy_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 49 easy_setopt(curl, CURLOPT_URL, URL); in test() 50 easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L); in test() 51 if(curl_multi_add_handle(mcurl, curl)) in test() 64 if(m->msg == CURLMSG_DONE && m->easy_handle == curl) { in test() 75 curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sock); in test() 85 ec = curl_easy_send(curl, testcmd + pos, in test() 130 curl_multi_remove_handle(mcurl, curl); in test() [all …]
|
H A D | lib1558.c | 33 CURL *curl = NULL; in test() local 37 easy_init(curl); in test() 39 easy_setopt(curl, CURLOPT_URL, URL); in test() 40 res = curl_easy_perform(curl); in test() 48 res = curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol); in test() 58 curl_easy_cleanup(curl); in test() 65 curl_easy_cleanup(curl); in test()
|
H A D | lib1534.c | 32 CURL *curl, *dupe = NULL; in test() local 38 easy_init(curl); in test() 43 res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime); in test() 56 easy_setopt(curl, CURLOPT_URL, URL); in test() 57 easy_setopt(curl, CURLOPT_FILETIME, 1L); in test() 59 res = curl_easy_perform(curl); in test() 69 res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime); in test() 86 dupe = curl_easy_duphandle(curl); in test() 111 curl_easy_reset(curl); in test() 113 res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime); in test() [all …]
|
H A D | lib3102.c | 93 CURL *curl; in test() local 101 curl = curl_easy_init(); in test() 102 if(!curl) { in test() 109 test_setopt(curl, CURLOPT_URL, URL); in test() 112 test_setopt(curl, CURLOPT_CERTINFO, 1L); in test() 115 test_setopt(curl, CURLOPT_WRITEFUNCTION, wrfu); in test() 118 test_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); in test() 119 test_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); in test() 122 res = curl_easy_perform(curl); in test() 126 res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &cert_info); in test() [all …]
|
H A D | lib1532.c | 32 CURL *curl; in test() local 38 easy_init(curl); in test() 40 easy_setopt(curl, CURLOPT_URL, URL); in test() 42 res = curl_easy_perform(curl); in test() 49 res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpcode); in test() 63 curl_easy_reset(curl); in test() 65 res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpcode); in test() 79 curl_easy_cleanup(curl); in test()
|
H A D | lib564.c | 37 CURL *curl = NULL; in test() local 45 easy_init(curl); in test() 47 easy_setopt(curl, CURLOPT_URL, URL); in test() 48 easy_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 49 easy_setopt(curl, CURLOPT_PROXY, libtest_arg2); in test() 50 easy_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS4); in test() 54 multi_add_handle(m, curl); in test() 90 curl_easy_cleanup(curl); in test()
|
H A D | lib1556.c | 50 CURL *curl = NULL; in test() local 56 easy_init(curl); in test() 58 easy_setopt(curl, CURLOPT_HEADERFUNCTION, header); in test() 59 easy_setopt(curl, CURLOPT_HEADERDATA, &info); in test() 60 easy_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 61 easy_setopt(curl, CURLOPT_URL, URL); in test() 63 code = curl_easy_perform(curl); in test() 76 curl_easy_cleanup(curl); in test()
|
/curl/docs/examples/ |
H A D | postit2.c | 48 CURL *curl; in main() local 58 curl = curl_easy_init(); in main() 59 if(curl) { in main() 61 form = curl_mime_init(curl); in main() 82 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/examplepost.cgi"); in main() 85 curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); in main() 86 curl_easy_setopt(curl, CURLOPT_MIMEPOST, form); in main() 89 res = curl_easy_perform(curl); in main() 96 curl_easy_cleanup(curl); in main()
|
H A D | multi-formadd.c | 41 CURL *curl; in main() local 75 curl = curl_easy_init(); in main() 81 if(curl && multi_handle) { in main() 84 curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/upload.cgi"); in main() 85 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); in main() 87 curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); in main() 89 curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); in main() 92 curl_multi_add_handle(multi_handle, curl); in main() 109 curl_easy_cleanup(curl); in main()
|
H A D | postit2-formadd.c | 52 CURL *curl; in main() local 86 curl = curl_easy_init(); in main() 90 if(curl) { in main() 92 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/examplepost.cgi"); in main() 95 curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); in main() 97 curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); in main() 101 res = curl_easy_perform(curl); in main() 108 curl_easy_cleanup(curl); in main()
|
/curl/docs/libcurl/opts/ |
H A D | CURLOPT_RESOLVER_START_DATA.md | 3 SPDX-License-Identifier: curl 22 #include <curl/curl.h> 54 CURL *curl = curl_easy_init(); 55 if(curl) { 56 curl_easy_setopt(curl, CURLOPT_RESOLVER_START_FUNCTION, resolver_start_cb); 57 curl_easy_setopt(curl, CURLOPT_RESOLVER_START_DATA, curl); 58 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); 59 curl_easy_perform(curl); 60 curl_easy_cleanup(curl);
|
H A D | CURLINFO_REDIRECT_COUNT.md | 3 SPDX-License-Identifier: curl 24 #include <curl/curl.h> 42 CURL *curl = curl_easy_init(); 43 if(curl) { 45 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); 46 curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); 47 res = curl_easy_perform(curl); 50 curl_easy_getinfo(curl, CURLINFO_REDIRECT_COUNT, &redirects); 52 curl_easy_cleanup(curl);
|
H A D | CURLOPT_DEBUGDATA.md | 3 SPDX-License-Identifier: curl 22 #include <curl/curl.h> 58 CURL *curl; 62 curl = curl_easy_init(); 63 if(curl) { 64 curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace); 66 curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &my_tracedata); 69 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); 71 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 72 res = curl_easy_perform(curl); [all …]
|
H A D | CURLOPT_LOW_SPEED_TIME.md | 3 SPDX-License-Identifier: curl 22 #include <curl/curl.h> 45 CURL *curl = curl_easy_init(); 46 if(curl) { 48 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); 50 curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 60L); 51 curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 30L); 52 res = curl_easy_perform(curl); 57 curl_easy_cleanup(curl);
|
/curl/tests/http/ |
H A D | test_13_proxy_auth.py | 65 curl = CurlClient(env=env) 73 curl = CurlClient(env=env) 75 xargs = curl.get_proxy_args(proxys=False) 85 curl = CurlClient(env=env) 87 xargs = curl.get_proxy_args(proxys=True) 96 curl = CurlClient(env=env) 98 xargs = curl.get_proxy_args(proxys=True) 105 curl = CurlClient(env=env) 114 curl = CurlClient(env=env) 130 curl = CurlClient(env=env) [all …]
|
H A D | test_10_proxy.py | 63 curl = CurlClient(env=env) 76 curl = CurlClient(env=env) 100 curl = CurlClient(env=env) 114 curl = CurlClient(env=env) 126 curl = CurlClient(env=env) 137 curl = CurlClient(env=env) 154 curl = CurlClient(env=env) 182 curl = CurlClient(env=env) 213 curl = CurlClient(env=env) 233 curl = CurlClient(env=env) [all …]
|