Zend_Http_Client Example Authenticate

//Exemplo 3 com negotiate
$username ='xxxx';
$password = 'xxxx';
$url = 'http://suapaginadeapi.com.br/api'; $client = new Zend_Http_Client($url); $client->setHeaders('WWW-Authenticate', 'Negotiate'); $client->setAuth($username, $password, Zend_Http_Client::AUTH_BASIC); $response = $client->request('GET'); print_r($response->getBody());
© 2016 Israel Guido - Consultoria Joomla