Skip to content

Commit

Permalink
renaming http clients
Browse files Browse the repository at this point in the history
  • Loading branch information
AsabuHere committed Sep 4, 2024
1 parent eb6a2bd commit cfa2eb9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/Twilio/Clients/BearerToken/TwilioOrgsTokenRestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class TwilioOrgsTokenRestClient
/// <summary>
/// Client to make HTTP requests
/// </summary>
public BearerTokenHttpClient HttpClient { get; }
public TokenHttpClient HttpClient { get; }

/// <summary>
/// Twilio region to make requests to
Expand Down Expand Up @@ -78,7 +78,7 @@ public class TwilioOrgsTokenRestClient
public TwilioOrgsTokenRestClient(
TokenManager tokenManager,
string region = null,
BearerTokenHttpClient httpClient = null,
TokenHttpClient httpClient = null,
string edge = null
)
{
Expand Down Expand Up @@ -262,12 +262,12 @@ public async Task<Response> RequestAsync(TokenRequest request)
return ProcessResponse(response);
}

private static BearerTokenHttpClient DefaultClient()
private static TokenHttpClient DefaultClient()
{
return new SystemNetBearerTokenHttpClient();
return new SystemNetTokenHttpClient();
}
#else
private static BearerTokenHttpClient DefaultClient()
private static TokenHttpClient DefaultClient()
{
return new WebBearerTokenRequestClient();
}
Expand Down Expand Up @@ -325,7 +325,7 @@ public static void ValidateSslCertificate()
/// </summary>
///
/// <param name="client">HTTP Client to use for testing the request</param>
public static void ValidateSslCertificate(BearerTokenHttpClient client)
public static void ValidateSslCertificate(TokenHttpClient client)
{
TokenRequest request = new TokenRequest("GET", "tls-test", ":443/", null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Twilio.Http.BearerToken
/// <summary>
/// Sample client to make HTTP requests
/// </summary>
public class SystemNetBearerTokenHttpClient : BearerTokenHttpClient
public class SystemNetTokenHttpClient : TokenHttpClient
{
#if NET462
private string PlatVersion = ".NET Framework 4.6.2+";
Expand All @@ -27,7 +27,7 @@ public class SystemNetBearerTokenHttpClient : BearerTokenHttpClient
/// Create new HttpClient
/// </summary>
/// <param name="httpClient">HTTP client to use</param>
public SystemNetBearerTokenHttpClient(System.Net.Http.HttpClient httpClient = null)
public SystemNetTokenHttpClient(System.Net.Http.HttpClient httpClient = null)
{
_httpClient = httpClient ?? new System.Net.Http.HttpClient(new HttpClientHandler() { AllowAutoRedirect = false });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Twilio.Http.BearerToken
/// <summary>
/// Base http client used to make Twilio requests
/// </summary>
public abstract class BearerTokenHttpClient
public abstract class TokenHttpClient
{
/// <summary>
/// The last request made by this client
Expand Down
2 changes: 1 addition & 1 deletion src/Twilio/Http/Net35/WebBearerTokenRequestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Twilio.Http.Net35
/// <summary>
/// Sample client to make requests
/// </summary>
public class WebBearerTokenRequestClient : BearerTokenHttpClient
public class WebBearerTokenRequestClient : TokenHttpClient
{
private const string PlatVersion = ".NET/3.5";
private HttpWebRequestFactory factory;
Expand Down

0 comments on commit cfa2eb9

Please sign in to comment.