src/Moar/Net/Http/Request.php
public function setCredentials ($user, $password, $type = CURLAUTH_ANYSAFE) {
    $this->addCurlOption(CURLOPT_HTTPAUTH, $type);
    $this->addCurlOption(CURLOPT_USERPWD, "{$user}:{$password}");
    return $this;
  }
public function setCredentials ($user, $password, $type = CURLAUTH_ANYSAFE) {
    $this->addCurlOption(CURLOPT_HTTPAUTH, $type);
    $this->addCurlOption(CURLOPT_USERPWD, "{$user}:{$password}");
    return $this;
  }
public function setCredentials ( $ user , $ password , $ type = CURLAUTH_ANYSAFE ) { $ this -> addCurlOption ( CURLOPT_HTTPAUTH , $ type ) ; $ this -> addCurlOption ( CURLOPT_USERPWD , "{$user}:{$password}" ) ; return $ this ; }
Set credentials for authenticating to remote host.

@param string $user Username
@param string $password Password
@param int    $type Auth type to attempt. See CURLOPT_HTTPAUTH section of
curl_setopt page at php.net for options.
@return Request Self, for message chaining
Set credentials for authenticating to remote host .