Merge branch 'patch-1' of git://github.com/k00ni/php-curl-class into k00ni-patch-1

* 'patch-1' of git://github.com/k00ni/php-curl-class:
  Add setDigestAuthentication to Curl class
This commit is contained in:
Zach Borboa
2015-02-22 00:40:14 +07:00
+7
View File
@@ -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)
{