Exemplo n.º 1
0
        public AzureMLAuthenticatedHttpClient(IAzureMLRecommendationsConfig config)
        {
            var accountKey = Encoding.ASCII.GetBytes(string.Format("{0}:{1}", config.AccountEmail, config.AccountKey));
            var header     = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(accountKey));

            DefaultRequestHeaders.Authorization = header;
        }
 public AzureMLRecommendationEngine(IAzureMLRecommendationsConfig configFile, IAzureMLAuthenticatedHttpClient httpClient, ITelemetryProvider telemetryProvider)
 {
     _config    = configFile;
     _client    = httpClient;
     _telemetry = telemetryProvider;
 }