• Home
  • Raw
  • Download

Lines Matching full:curl

28 class CurlSapiSandboxEx3 : public curl::CurlSapiSandbox {
49 return curl::CurlSapiSandbox::ModifyPolicy(policy_builder.get()); in ModifyPolicy()
64 curl::CurlApi api(&sandbox); in Example3()
68 // Initialize curl (CURL_GLOBAL_DEFAULT = 3) in Example3()
72 "curl_global_init failed: ", curl::StrError(&api, curl_code))); in Example3()
75 // Initialize curl easy handle in Example3()
76 curl::CURL* curl_handle; in Example3()
78 sapi::v::RemotePtr curl(curl_handle); in Example3() local
80 return absl::UnavailableError("curl_easy_init failed: Invalid curl handle"); in Example3()
87 api.curl_easy_setopt_ptr(&curl, curl::CURLOPT_URL, url.PtrBefore())); in Example3()
90 "curl_easy_setopt_ptr failed: ", curl::StrError(&api, curl_code))); in Example3()
96 curl_code, api.curl_easy_setopt_ptr(&curl, curl::CURLOPT_SSLCERTTYPE, in Example3()
100 "curl_easy_setopt_ptr failed: ", curl::StrError(&api, curl_code))); in Example3()
106 curl_code, api.curl_easy_setopt_ptr(&curl, curl::CURLOPT_SSLCERT, in Example3()
110 "curl_easy_setopt_ptr failed: ", curl::StrError(&api, curl_code))); in Example3()
116 api.curl_easy_setopt_ptr(&curl, curl::CURLOPT_SSLKEY, in Example3()
120 "curl_easy_setopt_ptr failed: ", curl::StrError(&api, curl_code))); in Example3()
126 curl_code, api.curl_easy_setopt_ptr(&curl, curl::CURLOPT_KEYPASSWD, in Example3()
130 "curl_easy_setopt_ptr failed: ", curl::StrError(&api, curl_code))); in Example3()
136 curl_code, api.curl_easy_setopt_ptr(&curl, curl::CURLOPT_CAINFO, in Example3()
140 "curl_easy_setopt_ptr failed: ", curl::StrError(&api, curl_code))); in Example3()
146 api.curl_easy_setopt_long(&curl, curl::CURLOPT_SSL_VERIFYPEER, 1L)); in Example3()
149 "curl_easy_setopt_long failed: ", curl::StrError(&api, curl_code))); in Example3()
153 SAPI_ASSIGN_OR_RETURN(curl_code, api.curl_easy_perform(&curl)); in Example3()
156 "curl_easy_perform failed: ", curl::StrError(&api, curl_code))); in Example3()
159 // Cleanup curl easy handle in Example3()
160 SAPI_RETURN_IF_ERROR(api.curl_easy_cleanup(&curl)); in Example3()
162 // Cleanup curl in Example3()