Skip to content

Commit

Permalink
Fixing structure of class
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemiller-rum committed Feb 6, 2024
1 parent dd5aa1e commit 0fbc746
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
13 changes: 0 additions & 13 deletions RDSServiceClient/RdsServiceClientOptions.cs

This file was deleted.

12 changes: 3 additions & 9 deletions RDSServiceClient/RdsSessionService.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Net.Http.Headers;
using System.Net.Http.Json;
using Microsoft.Extensions.Options;
using System.Net.Http.Json;
using RDSServiceLibrary;
using RDSServiceLibrary.Interfaces;
using RDSServiceLibrary.Models;
Expand All @@ -10,14 +8,10 @@ namespace RDSServiceClient
public class RdsSessionService : IRdsSessionService
{
private readonly HttpClient _httpClient;
private readonly IOptions<RdsServiceClientOptions> _options;

public RdsSessionService(IHttpClientFactory httpClientFactory, IOptions<RdsServiceClientOptions> options)
public RdsSessionService(IHttpClientFactory httpClientFactory)
{
_options = options;
_httpClient = httpClientFactory.CreateClient("RdsServiceClient");
_httpClient.BaseAddress = new Uri(options.Value.BaseUrl);
_httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
_httpClient = httpClientFactory.CreateClient();
}

public Task<string> GetActiveManagementServer(string? connectionBroker = null) =>
Expand Down

0 comments on commit 0fbc746

Please sign in to comment.