Skip to content

Commit

Permalink
minor refactoring. moved locationn of MyHttpClient class.
Browse files Browse the repository at this point in the history
  • Loading branch information
VeritasSoftware committed Jul 1, 2024
1 parent 6d6201b commit 207e41c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 0 additions & 10 deletions AspNetCore.ApiGateway/Application/ApiGatewayOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,4 @@ public class ApiGatewayOptions
public Action<IServiceProvider, HttpClient> DefaultHttpClientConfigure { get; set; }
public Func<IServiceProvider, MyHttpClient> DefaultMyHttpClient { get; set; }
}

public class MyHttpClient: IHttpService
{
public HttpClient Client { get; private set; }

public MyHttpClient(HttpClientHandler clientHandler)
{
Client = new HttpClient(clientHandler);
}
}
}
10 changes: 10 additions & 0 deletions AspNetCore.ApiGateway/Application/HttpService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,14 @@ public HttpService(HttpClient client)

public HttpClient Client { get; }
}

public class MyHttpClient : IHttpService
{
public HttpClient Client { get; private set; }

public MyHttpClient(HttpClientHandler clientHandler)
{
Client = new HttpClient(clientHandler);
}
}
}

0 comments on commit 207e41c

Please sign in to comment.