/external/libbrillo/brillo/http/ |
http_connection_curl.h | 16 #include <curl/curl.h> 20 namespace curl { namespace in namespace:brillo::http 25 Connection(CURL* curl_handle, 48 // Write data callback. Used by CURL when receiving response data. 53 // Read data callback. Used by CURL when sending request body data. 58 // Write header data callback. Used by CURL when receiving response headers. 89 CURL* curl_handle_{nullptr}; 95 friend class http::curl::Transport; 99 } // namespace curl [all...] |
http_transport_curl.h | 19 namespace curl { namespace in namespace:brillo::http 62 // Helper methods to convert CURL error codes (CURLcode and CURLMcode) 79 // Initializes CURL for async operation. 82 // Stops CURL's async operations. 85 // Handles all pending async messages from CURL. 89 void OnTransferComplete(http::curl::Connection* connection, 94 void CleanAsyncConnection(http::curl::Connection* connection); 96 // Called after a timeout delay requested by CURL has elapsed. 99 // Callback for CURL to handle curl_socket_callback() notifications. 101 static int MultiSocketCallback(CURL* easy [all...] |
http_transport_curl_unittest.cc | 27 namespace curl { namespace in namespace:brillo::http 34 handle_ = reinterpret_cast<CURL*>(100); // Mock handle value. 54 CURL* handle_{nullptr}; 183 CURL* handle_{reinterpret_cast<CURL*>(123)}; // Mock handle value. 196 // Initial expectations for creating a CURL connection. 304 } // namespace curl
|
http_connection_curl.cc | 16 namespace curl { namespace in namespace:brillo::http 18 static int curl_trace(CURL* /* handle */, 53 Connection::Connection(CURL* curl_handle, 61 // Store the connection pointer inside the CURL handle so we can easily 64 VLOG(2) << "curl::Connection created: " << method_; 71 VLOG(2) << "curl::Connection destroyed"; 266 } // namespace curl
|
http_connection_curl_unittest.cc | 30 namespace curl { namespace in namespace:brillo::http 42 // During the tests, use the address of |this| as the CURL* handle. 44 // having only CURL*. 45 CURL* GetCurlHandle() { return reinterpret_cast<CURL*>(this); } 48 static CURLcode Perform(CURL* curl) { 49 CurlPerformer* me = reinterpret_cast<CurlPerformer*>(curl); 53 // CURL callback functions and |connection| pointer needed to invoke the 120 // Custom matcher to validate the parameter of CURLOPT_HTTPHEADER CURL optio [all...] |
/external/libmicrohttpd/src/testcurl/ |
test_termination.c | 37 #include <curl/curl.h> 105 CURL *curl = curl_easy_init (); local 106 //curl_easy_setopt(curl, CURLOPT_POST, 1L); 109 curl_easy_setopt (curl, CURLOPT_URL, url); 110 curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, write_data); 112 CURLcode success = curl_easy_perform (curl); 115 fprintf (stderr, "CURL Error"); 121 curl_easy_cleanup (curl); [all...] |
test_get_response_cleanup.c | 73 execlp ("curl", "curl", "-s", "-N", "-o", "/dev/null", "-GET", url, NULL); 75 "Failed to exec curl: %s\n", 85 //fprintf (stderr, "Killing curl\n"); 150 pid_t curl; local 157 curl = fork_curl ("http://127.0.0.1:11080/"); 159 kill_curl (curl); 172 pid_t curl; local 181 //fprintf (stderr, "Forking cURL!\n"); 182 curl = fork_curl ("http://127.0.0.1:1081/") 208 pid_t curl; local 237 pid_t curl; local [all...] |
/external/curl/docs/examples/ |
curlgtk.c | 18 #include <curl/curl.h> 47 CURL *curl; local 52 curl = curl_easy_init(); 53 if(curl) { 54 const char *filename = "test.curl"; 57 curl_easy_setopt(curl, CURLOPT_URL, url); 58 curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile); 59 curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_write_func) [all...] |
imap-multi.c | 12 * are also available at https://curl.haxx.se/docs/copyright.html. 30 #include <curl/curl.h> 60 CURL *curl; local 67 curl = curl_easy_init(); 68 if(!curl) 76 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 77 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 80 curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1") [all...] |
pop3-multi.c | 12 * are also available at https://curl.haxx.se/docs/copyright.html. 30 #include <curl/curl.h> 60 CURL *curl; local 67 curl = curl_easy_init(); 68 if(!curl) 76 curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); 77 curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); 80 curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1") [all...] |
smooth-gtk-thread.c | 12 * are also available at https://curl.haxx.se/docs/copyright.html. 42 #include <curl/curl.h> 70 CURL *curl; local 86 curl = curl_easy_init(); 87 if(curl) { 92 curl_easy_setopt(curl, CURLOPT_URL, http); 95 curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile); 96 curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_file) [all...] |
smtp-multi.c | 12 * are also available at https://curl.haxx.se/docs/copyright.html. 29 #include <curl/curl.h> 105 CURL *curl; local 116 curl = curl_easy_init(); 117 if(!curl) 125 curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com"); 133 curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM); 140 curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients) [all...] |
rtsp.c | 59 #include <curl/curl.h> 75 static void rtsp_options(CURL *curl, const char *uri) 79 my_curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI, uri); 80 my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_OPTIONS); 81 my_curl_easy_perform(curl); 86 static void rtsp_describe(CURL *curl, const char *uri, 99 my_curl_easy_setopt(curl, CURLOPT_WRITEDATA, sdp_fp) 228 CURL *curl; local [all...] |
curlx.c | 88 #include <curl/curl.h> 142 CURL * curl; member in struct:sslctxparm_st 207 curl_easy_setopt(p->curl, CURLOPT_URL, accessinfo); 214 curl_easy_setopt(p->curl, CURLOPT_URL, accessinfo); 231 static CURLcode sslctxfun(CURL * curl, void * sslctx, void * parm) 413 if(!(p.curl = curl_easy_init())) { 414 BIO_printf(p.errorbio, "Cannot init curl lib\n") [all...] |
fopen.c | 19 * reference to original curl example code 58 #include <curl/curl.h> 70 CURL *curl; member in union:fcurl_data::__anon8495 93 /* curl calls this routine to get more data */ 251 file->handle.curl = curl_easy_init(); 253 curl_easy_setopt(file->handle.curl, CURLOPT_URL, url); 254 curl_easy_setopt(file->handle.curl, CURLOPT_WRITEDATA, file); 255 curl_easy_setopt(file->handle.curl, CURLOPT_VERBOSE, 0L) [all...] |
/external/curl/tests/libtest/ |
lib1506.c | 12 * are also available at https://curl.haxx.se/docs/copyright.html. 35 CURL *curl[NUM_HANDLES] = {0}; local 71 easy_init(curl[i]); 77 easy_setopt(curl[i], CURLOPT_URL, target_url); 79 easy_setopt(curl[i], CURLOPT_VERBOSE, 1L); 81 easy_setopt(curl[i], CURLOPT_HEADER, 1L); 83 easy_setopt(curl[i], CURLOPT_RESOLVE, slist); 90 multi_add_handle(m, curl[i]); 127 curl_multi_remove_handle(m, curl[i]) [all...] |
lib571.c | 12 * are also available at https://curl.haxx.se/docs/copyright.html. 103 CURL *curl; local 120 if((curl = curl_easy_init()) == NULL) { 126 test_setopt(curl, CURLOPT_URL, URL); 132 test_setopt(curl, CURLOPT_RTSP_STREAM_URI, stream_uri); 136 test_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, rtp_write); 137 test_setopt(curl, CURLOPT_TIMEOUT, 3L); 138 test_setopt(curl, CURLOPT_VERBOSE, 1L); 139 test_setopt(curl, CURLOPT_WRITEDATA, protofile) [all...] |
lib586.c | 12 * are also available at https://curl.haxx.se/docs/copyright.html. 39 static void my_lock(CURL *handle, curl_lock_data data, 70 static void my_unlock(CURL *handle, curl_lock_data data, void *useptr) 101 CURL *curl; local 104 if((curl = curl_easy_init()) == NULL) { 109 curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); 110 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); 111 curl_easy_setopt(curl, CURLOPT_URL, tdata->url); 113 curl_easy_setopt(curl, CURLOPT_SHARE, tdata->share) 135 CURL *curl; local [all...] |
lib1507.c | 12 * are also available at https://curl.haxx.se/docs/copyright.html. 67 CURL *curl = NULL; local 75 easy_init(curl); 84 curl_easy_setopt(curl, CURLOPT_URL, URL); 86 curl_easy_setopt(curl, CURLOPT_USERNAME, USERNAME); 87 curl_easy_setopt(curl, CURLOPT_PASSWORD, PASSWORD); 89 curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); 90 curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); 91 curl_easy_setopt(curl, CURLOPT_MAIL_FROM, MAILFROM) [all...] |
lib506.c | 12 * are also available at https://curl.haxx.se/docs/copyright.html. 43 static void my_lock(CURL *handle, curl_lock_data data, 83 static void my_unlock(CURL *handle, curl_lock_data data, void *useptr) 133 CURL *curl; local 136 curl = curl_easy_init(); 137 if(!curl) { 143 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); 144 curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); 145 curl_easy_setopt(curl, CURLOPT_URL, tdata->url) 179 CURL *curl; local [all...] |
lib518.c | 12 * are also available at https://curl.haxx.se/docs/copyright.html. 467 CURL *curl; local 492 if((curl = curl_easy_init()) == NULL) { 499 test_setopt(curl, CURLOPT_URL, URL); 500 test_setopt(curl, CURLOPT_HEADER, 1L); 502 res = curl_easy_perform(curl); 507 curl_easy_cleanup(curl);
|
lib537.c | 12 * are also available at https://curl.haxx.se/docs/copyright.html. 469 CURL *curl; local 494 if((curl = curl_easy_init()) == NULL) { 501 test_setopt(curl, CURLOPT_URL, URL); 502 test_setopt(curl, CURLOPT_HEADER, 1L); 504 res = curl_easy_perform(curl); 509 curl_easy_cleanup(curl);
|
lib552.c | 12 * are also available at https://curl.haxx.se/docs/copyright.html. 84 int my_trace(CURL *handle, curl_infotype type, 129 size_t amount = nmemb * size; /* Total bytes curl wants */ 150 static curlioerr ioctl_callback(CURL * handle, int cmd, void *clientp) 167 CURL *curl; local 175 if((curl = curl_easy_init()) == NULL) { 181 test_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace); 182 test_setopt(curl, CURLOPT_DEBUGDATA, &config); 184 test_setopt(curl, CURLOPT_VERBOSE, 1L) [all...] |
lib582.c | 12 * are also available at https://curl.haxx.se/docs/copyright.html. 103 * Callback invoked by curl to poll reading / writing of a socket. 105 static int curlSocketCallback(CURL *easy, curl_socket_t s, int action, 128 * Callback invoked by curl to set a timeout. 146 * Check for curl completion. 148 static int checkForCompletion(CURLM* curl, int* success) 154 while((message = curl_multi_info_read(curl, &numMessages)) != NULL) { 163 fprintf(stderr, "Got an unexpected message from curl: %i\n", 200 static void notifyCurl(CURLM *curl, curl_socket_t s, int evBitmask, 204 CURLMcode result = curl_multi_socket_action(curl, s, evBitmask, &numhandles) 228 CURL *curl = NULL; local [all...] |
/external/okhttp/okcurl/src/test/java/com/squareup/okhttp/curl/ |
MainTest.java | 16 package com.squareup.okhttp.curl; 24 import static com.squareup.okhttp.curl.Main.fromArgs;
|