Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,7 @@ public AssemblyAIClient(
{

HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
if (baseUri is not null)
{
HttpClient.BaseAddress ??= baseUri;
}
HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl);
Authorizations = authorizations ?? new global::System.Collections.Generic.List<global::AssemblyAI.EndPointAuthorization>();
Options = options ?? new global::AssemblyAI.AutoSDKClientOptions();
_disposeHttpClient = disposeHttpClient;
Expand Down Expand Up @@ -298,7 +295,7 @@ private void SelectServer(global::AssemblyAI.AutoSDKServer? server)
return explicitBaseUri;
}

return ResolveSelectedServer()?.Uri ?? (s_availableServers.Length > 0 ? s_availableServers[0].Uri : HttpClient.BaseAddress);
return ResolveSelectedServer()?.Uri ?? HttpClient.BaseAddress;
}

private global::System.Uri? ResolveBaseUri(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@ public SubpackageFilesClient(
{

HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
if (baseUri is not null)
{
HttpClient.BaseAddress ??= baseUri;
}
HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl);
Authorizations = authorizations ?? new global::System.Collections.Generic.List<global::AssemblyAI.EndPointAuthorization>();
Options = options ?? new global::AssemblyAI.AutoSDKClientOptions();
_disposeHttpClient = disposeHttpClient;
Expand Down Expand Up @@ -258,7 +255,7 @@ private void SelectServer(global::AssemblyAI.AutoSDKServer? server)
return explicitBaseUri;
}

return ResolveSelectedServer()?.Uri ?? (s_availableServers.Length > 0 ? s_availableServers[0].Uri : HttpClient.BaseAddress);
return ResolveSelectedServer()?.Uri ?? HttpClient.BaseAddress;
}

private global::System.Uri? ResolveBaseUri(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@ public SubpackageStreamingApiClient(
{

HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
if (baseUri is not null)
{
HttpClient.BaseAddress ??= baseUri;
}
HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl);
Authorizations = authorizations ?? new global::System.Collections.Generic.List<global::AssemblyAI.EndPointAuthorization>();
Options = options ?? new global::AssemblyAI.AutoSDKClientOptions();
_disposeHttpClient = disposeHttpClient;
Expand Down Expand Up @@ -258,7 +255,7 @@ private void SelectServer(global::AssemblyAI.AutoSDKServer? server)
return explicitBaseUri;
}

return ResolveSelectedServer()?.Uri ?? (s_availableServers.Length > 0 ? s_availableServers[0].Uri : HttpClient.BaseAddress);
return ResolveSelectedServer()?.Uri ?? HttpClient.BaseAddress;
}

private global::System.Uri? ResolveBaseUri(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@ public SubpackageTranscriptsClient(
{

HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
if (baseUri is not null)
{
HttpClient.BaseAddress ??= baseUri;
}
HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl);
Authorizations = authorizations ?? new global::System.Collections.Generic.List<global::AssemblyAI.EndPointAuthorization>();
Options = options ?? new global::AssemblyAI.AutoSDKClientOptions();
_disposeHttpClient = disposeHttpClient;
Expand Down Expand Up @@ -258,7 +255,7 @@ private void SelectServer(global::AssemblyAI.AutoSDKServer? server)
return explicitBaseUri;
}

return ResolveSelectedServer()?.Uri ?? (s_availableServers.Length > 0 ? s_availableServers[0].Uri : HttpClient.BaseAddress);
return ResolveSelectedServer()?.Uri ?? HttpClient.BaseAddress;
}

private global::System.Uri? ResolveBaseUri(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@ public SubpackageVoiceAgentApiClient(
{

HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
if (baseUri is not null)
{
HttpClient.BaseAddress ??= baseUri;
}
HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl);
Authorizations = authorizations ?? new global::System.Collections.Generic.List<global::AssemblyAI.EndPointAuthorization>();
Options = options ?? new global::AssemblyAI.AutoSDKClientOptions();
_disposeHttpClient = disposeHttpClient;
Expand Down Expand Up @@ -258,7 +255,7 @@ private void SelectServer(global::AssemblyAI.AutoSDKServer? server)
return explicitBaseUri;
}

return ResolveSelectedServer()?.Uri ?? (s_availableServers.Length > 0 ? s_availableServers[0].Uri : HttpClient.BaseAddress);
return ResolveSelectedServer()?.Uri ?? HttpClient.BaseAddress;
}

private global::System.Uri? ResolveBaseUri(
Expand Down