<commit_before>﻿using SFA.DAS.CommitmentsV2.Api.Client.Configuration;
using SFA.DAS.Http;

namespace SFA.DAS.CommitmentsV2.Api.Client
{
    public class CommitmentsApiClientFactory : ICommitmentsApiClientFactory
    {
        private readonly CommitmentsClientApiConfiguration _config;

        public CommitmentsApiClientFactory(CommitmentsClientApiConfiguration config)
        {
            _config = config;
        }
        public ICommitmentsApiClient CreateClient()
        {
            var httpClientFactory = new AzureActiveDirectoryHttpClientFactory(_config);
            var httpClient = httpClientFactory.CreateHttpClient();
            var restHttpClient = new RestHttpClient(httpClient);
            return new CommitmentsApiClient(restHttpClient);
        }
    }
}<commit_msg>changed factory to use CommitmentsRestHttpClient in place of the RestHttpClient<commit_after>﻿using SFA.DAS.CommitmentsV2.Api.Client.Configuration;
using SFA.DAS.CommitmentsV2.Api.Client.Http;
using SFA.DAS.Http;

namespace SFA.DAS.CommitmentsV2.Api.Client
{
    public class CommitmentsApiClientFactory : ICommitmentsApiClientFactory
    {
        private readonly CommitmentsClientApiConfiguration _config;

        public CommitmentsApiClientFactory(CommitmentsClientApiConfiguration config)
        {
            _config = config;
        }
        public ICommitmentsApiClient CreateClient()
        {
            var httpClientFactory = new AzureActiveDirectoryHttpClientFactory(_config);
            var httpClient = httpClientFactory.CreateHttpClient();
            var restHttpClient = new CommitmentsRestHttpClient(httpClient);
            return new CommitmentsApiClient(restHttpClient);
        }
    }
}
{'fraction_non_alphanumeric': 0.0608187134502924, 'fraction_numerical': 0.0029239766081871343, 'mean_word_length': 3.309823677581864, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '682951', 'n_tokens_mistral': 433, 'n_tokens_neox': 440, 'n_words': 83}