Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(httpBase?: Base) {
super();
this._httpBase = httpBase || new Base();
this._config.pollingInterval = ProvisioningDeviceConstants.defaultPollingInterval;
this._config.timeoutInterval = ProvisioningDeviceConstants.defaultTimeoutInterval;
}
constructor(authenticationProvider: AuthenticationProvider, httpTransport?: any) {
/*Codes_SRS_NODE_FILE_UPLOAD_ENDPOINT_16_019: [`FileUploadApi` shall throw a `ReferenceError` if `authenticationProvider` is falsy.]*/
if (!authenticationProvider) throw new ReferenceError('authenticationProvider cannot be \'' + authenticationProvider + '\'');
this._authenticationProvider = authenticationProvider;
/*Codes_SRS_NODE_FILE_UPLOAD_ENDPOINT_16_018: [`FileUploadApi` shall instantiate the default `azure-iot-http-base.Http` transport if `transport` is not specified, otherwise it shall use the specified transport.]*/
this.http = httpTransport ? httpTransport : new DefaultHttpTransport();
}
function Http(config) {
this._config = config;
this._http = new Base();
}
function Http(config) {
this._config = config;
this._http = new Base();
}