リクエストヘッダに書くメソッドがHTTP_Request にある。


/**
* Sets a proxy to be used
*
* @param string Proxy host
* @param int Proxy port
* @param string Proxy username
* @param string Proxy password
* @access public
*/
function setProxy($host, $port = 8080, $user = null, $pass = null)
{
$this->_proxy_host = $host;
$this->_proxy_port = $port;
$this->_proxy_user = $user;
$this->_proxy_pass = $pass;

if (!empty($user)) {
$this->addHeader('Proxy-Authorization', 'Basic ' . base64_encode($user . ':' . $pass));
}
}

/**
* Sets basic authentication parameters
*
* @param string Username
* @param string Password
*/
function setBasicAuth($user, $pass)
{
$this->_user = $user;
$this->_pass = $pass;

$this->addHeader('Authorization', 'Basic ' . base64_encode($user . ':' . $pass));
}