CreateHttpClient() public method

public CreateHttpClient ( ) : HttpClient
return System.Net.Http.HttpClient
        public CompaniesHouseClient(ICompaniesHouseSettings settings)
        {
            var httpClientFactory = new HttpClientFactory(settings);
            _httpClient = httpClientFactory.CreateHttpClient();

            _companiesHouseSearchClient = new CompaniesHouseSearchClient(_httpClient, new SearchUriBuilderFactory());
            _companiesHouseCompanyProfileClient = new CompaniesHouseCompanyProfileClient(_httpClient, new CompanyProfileUriBuilder());
            _companiesHouseCompanyFilingHistoryClient = new CompaniesHouseCompanyFilingHistoryClient(_httpClient, new CompanyFilingHistoryUriBuilder());
            _companiesHouseOfficersClient = new CompaniesHouseOfficersClient(_httpClient, new OfficersUriBuilder());
            _companiesHouseCompanyInsolvencyInformationClient = new CompaniesHouseCompanyInsolvencyInformationClient(_httpClient);
        }
        public CompaniesHouseClient(ICompaniesHouseSettings settings)
        {
            var httpClientFactory = new HttpClientFactory(settings);

            _httpClient = httpClientFactory.CreateHttpClient();

            _companiesHouseSearchClient                       = new CompaniesHouseSearchClient(_httpClient, new SearchUriBuilderFactory());
            _companiesHouseCompanyProfileClient               = new CompaniesHouseCompanyProfileClient(_httpClient, new CompanyProfileUriBuilder());
            _companiesHouseCompanyFilingHistoryClient         = new CompaniesHouseCompanyFilingHistoryClient(_httpClient, new CompanyFilingHistoryUriBuilder());
            _companiesHouseOfficersClient                     = new CompaniesHouseOfficersClient(_httpClient, new OfficersUriBuilder());
            _companiesHouseCompanyInsolvencyInformationClient = new CompaniesHouseCompanyInsolvencyInformationClient(_httpClient);
        }
Esempio n. 3
0
        public CompaniesHouseClient(ICompaniesHouseSettings settings)
        {
            var httpClientFactory = new HttpClientFactory(settings);

            _httpClient = httpClientFactory.CreateHttpClient();

            _companiesHouseSearchClient                        = new CompaniesHouseSearchClient(_httpClient, new SearchUriBuilderFactory());
            _companiesHouseCompanyProfileClient                = new CompaniesHouseCompanyProfileClient(_httpClient, new CompanyProfileUriBuilder());
            _companiesHouseCompanyFilingHistoryClient          = new CompaniesHouseCompanyFilingHistoryClient(_httpClient, new CompanyFilingHistoryUriBuilder(), new FilingHistoryItemUriBuilder());
            _companiesHouseOfficersClient                      = new CompaniesHouseOfficersClient(_httpClient, new OfficersUriBuilder());
            _companiesHouseCompanyInsolvencyInformationClient  = new CompaniesHouseCompanyInsolvencyInformationClient(_httpClient);
            _companiesHousePersonsWithSignificantControlClient = new CompaniesHousePersonsWithSignificantControlClient(_httpClient,
                                                                                                                       new PersonsWithSignificantControlUriBuilder(), new PersonsWithSignificantControlIndividualUriBuilder(), new PersonsWithSignificantControlStatementsUriBuilder(), new PersonsWithSignificantControlStatementItemUriBuilder(), new PersonsWithSignificantControlSuperSecurePersonUriBuilder(), new PersonsWithSignificantControlUriCorporateEntitiesBuilder(), new PersonsWithSignificantControlUriLegalPersonBuilder());
            _companiesHouseCompanyChargesClient = new CompaniesHouseCompanyChargesClient(_httpClient, new CompanyChargesUriBuilder(), new ChargeItemUriBuilder());
        }
Esempio n. 4
0
        public CompaniesHouseClient(ICompaniesHouseSettings settings)
        {
            var httpClientFactory = new HttpClientFactory(settings);

            _httpClient = httpClientFactory.CreateHttpClient();

            _companiesHouseSearchClient                       = new CompaniesHouseSearchClient(_httpClient, new SearchUriBuilderFactory());
            _companiesHouseCompanyProfileClient               = new CompaniesHouseCompanyProfileClient(_httpClient, new CompanyProfileUriBuilder());
            _companiesHouseCompanyFilingHistoryClient         = new CompaniesHouseCompanyFilingHistoryClient(_httpClient, new CompanyFilingHistoryUriBuilder());
            _companiesHouseOfficersClient                     = new CompaniesHouseOfficersClient(_httpClient, new OfficersUriBuilder());
            _companiesHouseCompanyInsolvencyInformationClient = new CompaniesHouseCompanyInsolvencyInformationClient(_httpClient);
            _companiesHouseCompanyAppointmentsClient          = new CompaniesHouseAppointmentsClient(_httpClient);
            var documentUriBuilder = new DocumentUriBuilder();

            _companiesHouseDocumentMetadataClient = new CompaniesHouseDocumentMetadataClient(_httpClient, documentUriBuilder);
            _companiesHouseDocumentClient         = new CompaniesHouseDocumentClient(_httpClient, documentUriBuilder);
            _companiesHousePersonsWithSignificantControlClient = new CompaniesHousePersonsWithSignificantControlClient(_httpClient, new PersonsWithSignificantControlBuilder());
        }