On this page
Requests_Proxy_HTTP::curl_before_send( resource $handle )
Set cURL parameters before the data is sent
Parameters
$handleresource Required-
cURL resource
Source
File: wp-includes/Requests/Proxy/HTTP.php. View all references
public function curl_before_send(&$handle) {
curl_setopt($handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt($handle, CURLOPT_PROXY, $this->proxy);
if ($this->use_authentication) {
curl_setopt($handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
curl_setopt($handle, CURLOPT_PROXYUSERPWD, $this->get_auth_string());
}
}
Related
Uses
| Uses | Description |
|---|---|
| Requests_Proxy_HTTP::get_auth_string() wp-includes/Requests/Proxy/HTTP.php | Get the authentication string (user:pass) |
Changelog
| Version | Description |
|---|---|
| 1.6 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_proxy_http/curl_before_send