httpclient : do not force the namespace for domframework

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5305 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2019-06-03 10:04:00 +00:00
parent db38df6a88
commit a0a5e70fc4

View File

@@ -429,6 +429,19 @@ class Httpclient
}
// }}}
/** Set the authentication in Basic type
* @param string $login The login to use
* @param string $password The password to use
*/
public function authBasic ($login, $password)
// {{{
{
$this->headersSent["Authorization"] = "Basic ".
base64_encode ("$login:$password");
return $this;
}
// }}}
//////////////////////////////////
//// THE ACTIVE METHODS ////
//////////////////////////////////
@@ -584,8 +597,7 @@ class Httpclient
// {{{
if ($this->tcpclient === null)
{
$this->tcpclient = new \vendor\domframework\tcpclient ($parseURL["host"],
$this->port);
$this->tcpclient = new tcpclient ($parseURL["host"], $this->port);
$this->tcpclient->timeout ($this->timeout);
$this->tcpclient->connect ();
if ($parseURL["scheme"] === "https")