WpOrg\Requests\Proxy
Http::curl_before_send
Set cURL parameters before the data is sent
Метод класса: Http{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Http = new Http(); $Http->curl_before_send( $handle );
- $handle(resource|\CurlHandle) (обязательный) (передается по ссылке — &)
- cURL handle.
Список изменений
| С версии 1.6 | Введена. |
Код Http::curl_before_send() Http::curl before send WP 6.8.3
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());
}
}