Requests_Proxy_HTTP::curl_before_send

Advertisement

Summery Summery

Set cURL parameters before the data is sent

Syntax Syntax

Requests_Proxy_HTTP::curl_before_send( resource $handle )

Parameters Parameters

$handle

(Required) cURL resource

Source Source

File: wp-includes/Requests/Proxy/HTTP.php

	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());
		}
	}

Advertisement

Changelog Changelog

Changelog
Version Description
1.6 Introduced.

Advertisement

Leave a Reply