public function http_authentication($username = '', $password = '', $type = CURLAUTH_ANY) {

        // set the required options
		$this->option(array(
            CURLOPT_HTTPAUTH    =>  ($username == '' && $password == '' ? null : $type),
            CURLOPT_USERPWD     =>  ($username == '' && $password == '' ? null : ($username . ':' . $password)),
        ));

    }