/curl/tests/libtest/ |
H A D | lib1933.c | 30 CURL *curl; in test() local 40 curl = curl_easy_init(); in test() 41 if(!curl) { in test() 47 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 48 test_setopt(curl, CURLOPT_AWS_SIGV4, "xxx"); in test() 49 test_setopt(curl, CURLOPT_HEADER, 0L); in test() 50 test_setopt(curl, CURLOPT_URL, URL); in test() 54 test_setopt(curl, CURLOPT_CONNECT_TO, connect_to); in test() 56 test_setopt(curl, CURLOPT_HTTPHEADER, list); in test() 58 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib1513.c | 52 CURL *curl; in test() local 57 easy_init(curl); in test() 59 easy_setopt(curl, CURLOPT_URL, URL); in test() 60 easy_setopt(curl, CURLOPT_TIMEOUT, (long)7); in test() 61 easy_setopt(curl, CURLOPT_NOSIGNAL, (long)1); in test() 63 easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progressKiller); in test() 64 easy_setopt(curl, CURLOPT_PROGRESSDATA, NULL); in test() 66 easy_setopt(curl, CURLOPT_NOPROGRESS, (long)0); in test() 68 res = curl_easy_perform(curl); in test() 74 curl_easy_cleanup(curl); in test()
|
H A D | lib511.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_FILETIME, 1L); in test() 47 test_setopt(curl, CURLOPT_NOBODY, 1L); in test() 48 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 50 res = curl_easy_perform(curl); in test() 54 curl_easy_cleanup(curl); in test()
|
H A D | lib599.c | 46 CURL *curl; in test() local 55 curl = curl_easy_init(); in test() 56 if(!curl) { in test() 63 test_setopt(curl, CURLOPT_URL, URL); in test() 66 test_setopt(curl, CURLOPT_NOPROGRESS, 0L); in test() 68 test_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback); in test() 72 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 75 test_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); in test() 78 test_setopt(curl, CURLOPT_HEADER, 1L); in test() 81 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib1955.c | 30 CURL *curl; in test() local 40 curl = curl_easy_init(); in test() 41 if(!curl) { in test() 47 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 48 test_setopt(curl, CURLOPT_AWS_SIGV4, "xxx"); in test() 49 test_setopt(curl, CURLOPT_USERPWD, "xxx"); in test() 50 test_setopt(curl, CURLOPT_HEADER, 0L); in test() 51 test_setopt(curl, CURLOPT_URL, URL); in test() 78 test_setopt(curl, CURLOPT_HTTPHEADER, list); in test() 80 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib571.c | 106 CURL *curl; in test() local 122 curl = curl_easy_init(); in test() 123 if(!curl) { in test() 129 test_setopt(curl, CURLOPT_URL, URL); in test() 142 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 148 res = curl_easy_perform(curl); in test() 163 res = curl_easy_perform(curl); in test() 178 res = curl_easy_perform(curl); in test() 192 res = curl_easy_perform(curl); in test() 202 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib508.c | 54 CURL *curl; in test() local 67 curl = curl_easy_init(); in test() 68 if(!curl) { in test() 75 test_setopt(curl, CURLOPT_URL, URL); in test() 78 test_setopt(curl, CURLOPT_POST, 1L); in test() 84 test_setopt(curl, CURLOPT_READFUNCTION, read_callback); in test() 87 test_setopt(curl, CURLOPT_READDATA, &pooh); in test() 90 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 93 test_setopt(curl, CURLOPT_HEADER, 1L); in test() 96 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib516.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_HTTPPOST, NULL); in test() 50 test_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */ in test() 51 test_setopt(curl, CURLOPT_HEADER, 1L); /* include header */ in test() 54 res = curl_easy_perform(curl); in test() 59 curl_easy_cleanup(curl); in test()
|
H A D | lib521.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_PORT, strtol(libtest_arg2, NULL, 10)); in test() 47 test_setopt(curl, CURLOPT_USERPWD, "xxx:yyy"); in test() 48 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 50 res = curl_easy_perform(curl); in test() 54 curl_easy_cleanup(curl); in test()
|
H A D | lib542.c | 38 CURL *curl; in test() local 47 curl = curl_easy_init(); in test() 48 if(!curl) { in test() 55 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 58 test_setopt(curl, CURLOPT_NOBODY, 1L); in test() 61 test_setopt(curl, CURLOPT_HEADER, 0L); in test() 64 test_setopt(curl, CURLOPT_URL, URL); in test() 67 res = curl_easy_perform(curl); in test() 71 curl_easy_cleanup(curl); in test()
|
H A D | lib579.c | 97 CURL *curl; in test() local 108 curl = curl_easy_init(); in test() 109 if(!curl) { in test() 118 curl_easy_cleanup(curl); in test() 124 test_setopt(curl, CURLOPT_URL, URL); in test() 127 test_setopt(curl, CURLOPT_POST, 1L); in test() 136 test_setopt(curl, CURLOPT_VERBOSE, 1L); in test() 139 test_setopt(curl, CURLOPT_HEADER, 1L); in test() 148 test_setopt(curl, CURLOPT_NOPROGRESS, 0L); in test() 154 res = curl_easy_perform(curl); in test() [all …]
|
H A D | lib574.c | 42 CURL *curl; in test() local 49 curl = curl_easy_init(); in test() 50 if(!curl) { in test() 56 test_setopt(curl, CURLOPT_URL, URL); in test() 57 test_setopt(curl, CURLOPT_WILDCARDMATCH, 1L); in test() 58 test_setopt(curl, CURLOPT_FNMATCH_FUNCTION, new_fnmatch); in test() 59 test_setopt(curl, CURLOPT_TIMEOUT_MS, (long) TEST_HANG_TIMEOUT); in test() 61 res = curl_easy_perform(curl); in test() 66 res = curl_easy_perform(curl); in test() 73 curl_easy_cleanup(curl); in test()
|
/curl/docs/examples/ |
H A D | netrc.c | 33 CURL *curl; in main() local 36 curl = curl_easy_init(); in main() 37 if(curl) { in main() 38 curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL); in main() 39 curl_easy_setopt(curl, CURLOPT_NETRC_FILE, in main() 41 curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/"); in main() 43 res = curl_easy_perform(curl); in main() 45 curl_easy_cleanup(curl); in main()
|
H A D | ftpgetinfo.c | 46 CURL *curl; in main() local 54 curl = curl_easy_init(); in main() 55 if(curl) { in main() 56 curl_easy_setopt(curl, CURLOPT_URL, ftpurl); in main() 58 curl_easy_setopt(curl, CURLOPT_NOBODY, 1L); in main() 60 curl_easy_setopt(curl, CURLOPT_FILETIME, 1L); in main() 61 curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, throw_away); in main() 62 curl_easy_setopt(curl, CURLOPT_HEADER, 0L); in main() 66 res = curl_easy_perform(curl); in main() 70 res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime); in main() [all …]
|
H A D | default-scheme.c | 33 CURL *curl; in main() local 36 curl = curl_easy_init(); in main() 37 if(curl) { in main() 38 curl_easy_setopt(curl, CURLOPT_URL, "example.com"); in main() 42 curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https"); in main() 44 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); in main() 47 res = curl_easy_perform(curl); in main() 54 curl_easy_cleanup(curl); in main()
|
H A D | rtsp-options.c | 33 CURL *curl; in main() local 36 curl = curl_easy_init(); in main() 37 if(curl) { in main() 38 curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/"); in main() 40 curl_easy_setopt(curl, CURLOPT_RTSP_SESSION_ID, "12345"); in main() 42 curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_OPTIONS); in main() 45 res = curl_easy_perform(curl); in main() 52 curl_easy_cleanup(curl); in main()
|
H A D | anyauthput.c | 85 CURL *curl; in main() local 107 curl = curl_easy_init(); in main() 108 if(curl) { in main() 113 curl_easy_setopt(curl, CURLOPT_READDATA, (void *) fp); in main() 116 curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, my_seek); in main() 119 curl_easy_setopt(curl, CURLOPT_SEEKDATA, (void *) fp); in main() 122 curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); in main() 126 curl_easy_setopt(curl, CURLOPT_URL, url); in main() 130 curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, in main() 142 res = curl_easy_perform(curl); in main() [all …]
|
H A D | imap-fetch.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, in main() 55 res = curl_easy_perform(curl); in main() 63 curl_easy_cleanup(curl); in main()
|
H A D | imap-list.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() 53 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com"); in main() 56 res = curl_easy_perform(curl); in main() 64 curl_easy_cleanup(curl); in main()
|
H A D | pop3-list.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 res = curl_easy_perform(curl); in main() 62 curl_easy_cleanup(curl); in main()
|
H A D | pop3-retr.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 res = curl_easy_perform(curl); in main() 62 curl_easy_cleanup(curl); in main()
|
H A D | imap-multi.c | 41 CURL *curl; in main() local 47 curl = curl_easy_init(); in main() 48 if(!curl) in main() 56 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); in main() 57 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); in main() 60 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1"); in main() 63 curl_multi_add_handle(mcurl, curl); in main() 77 curl_multi_remove_handle(mcurl, curl); in main() 79 curl_easy_cleanup(curl); in main()
|
H A D | pop3-multi.c | 41 CURL *curl; in main() local 47 curl = curl_easy_init(); in main() 48 if(!curl) in main() 56 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); in main() 57 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); in main() 60 curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1"); in main() 63 curl_multi_add_handle(mcurl, curl); in main() 78 curl_multi_remove_handle(mcurl, curl); in main() 80 curl_easy_cleanup(curl); in main()
|
H A D | altsvc.c | 33 CURL *curl; in main() local 36 curl = curl_easy_init(); in main() 37 if(curl) { in main() 38 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); in main() 41 curl_easy_setopt(curl, CURLOPT_ALTSVC, "altsvc.txt"); in main() 44 curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, (long) in main() 48 res = curl_easy_perform(curl); in main() 55 curl_easy_cleanup(curl); in main()
|
H A D | simplepost.c | 34 CURL *curl; in main() local 39 curl = curl_easy_init(); in main() 40 if(curl) { in main() 41 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); in main() 42 curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis); in main() 45 curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis)); in main() 48 res = curl_easy_perform(curl); in main() 55 curl_easy_cleanup(curl); in main()
|