public function setAuth($username, $password, $type = 'basic')
    {
        $this->options[GuzzleRequestOptions::AUTH] = [$username, $password, $type];

        return $this;
    }
public function setAuth($username, $password, $type = 'basic')
    {
        $this->options[GuzzleRequestOptions::AUTH] = [$username, $password, $type];

        return $this;
    }
public function setAuth ( $ username , $ password , $ type = 'basic' ) { $ this -> options [ GuzzleRequestOptions :: AUTH ] = [ $ username , $ password , $ type ] ; return $ this ; }
Specifies HTTP authorization parameters to use with the request

This is currently only supported when using the cURL handler.

@param string $username
@param string $password
@param string $type authentication type: "basic" (default), "digest"

@return $this
Specifies HTTP authorization parameters to use with the request