lib/services/serviceclient.js
/**
* Creates a new ServiceClient object.
*
* @constructor
* @param {string} host                    The host for the service.
* @param {string} storageAccount          The storage account.
* @param {string} storageAccessKey        The storage access key.
* @param {object} authenticationProvider  The authentication provider object (e.g. sharedkey / sharedkeytable / sharedaccesssignature).
*/
Creates a new ServiceClient object.
Creates a new ServiceClient object .
function ServiceClient(host, storageAccount, storageAccessKey, authenticationProvider) {
  this._setAccountCredentials(storageAccount, storageAccessKey);
  this._initDefaultFilter();
  if (host) {
    var parsedHost = this._parseHost(host);
    this.host = parsedHost.hostname;
    this.port = parsedHost.port;
    this.protocol = parsedHost.protocol + '//';
  }
  else {
    this.protocol = ServiceClient.DEFAULT_PROTOCOL;
  }
  this.apiVersion = HeaderConstants.TARGET_STORAGE_VERSION;
  this.useProxy = false;
  this.proxyUrl = '';
  this.proxyPort = 80;
  this.usePathStyleUri = ServiceClient.isEmulated(host);
  this.authenticationProvider = authenticationProvider;
  this.logger = new Logger(Logger.LogLevels.NOTICE);
}
function ServiceClient ( host , storageAccount , storageAccessKey , authenticationProvider ) { this . _setAccountCredentials ( storageAccount , storageAccessKey ) ; this . _initDefaultFilter ( ) ; if ( host ) { var parsedHost = this . _parseHost ( host ) ; this . host = parsedHost . hostname ; this . port = parsedHost . port ; this . protocol = parsedHost . protocol + '//' ; } else { this . protocol = ServiceClient . DEFAULT_PROTOCOL ; } this . apiVersion = HeaderConstants . TARGET_STORAGE_VERSION ; this . useProxy = false ; this . proxyUrl = '' ; this . proxyPort = 80 ; this . usePathStyleUri = ServiceClient . isEmulated ( host ) ; this . authenticationProvider = authenticationProvider ; this . logger = new Logger ( Logger . LogLevels . NOTICE ) ; }
Creates a new ServiceClient object.
Creates a new ServiceClient object .