mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 04:01:47 +00:00
Merge branch 'k00ni-patch-1'
* k00ni-patch-1: Add setDigestAuthentication to Curl class
This commit is contained in:
@@ -291,6 +291,13 @@ class Curl
|
||||
$this->setOpt(CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
|
||||
$this->setOpt(CURLOPT_USERPWD, $username . ':' . $password);
|
||||
}
|
||||
|
||||
public function setDigestAuthentication($username, $password = '')
|
||||
{
|
||||
$this->setOpt(CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
|
||||
$this->setOpt(CURLOPT_USERPWD, $username . ':' . $password);
|
||||
$this->setOpt(CURLOPT_RETURNTRANSFER, true);
|
||||
}
|
||||
|
||||
public function setCookie($key, $value)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user