Skip to content

Commit ed1e209

Browse files
sd-stcopybara-github
authored andcommitted
Copybara import of the project:
-- 1c5fd02041399c1821fb8b66e64f737af06d533e by S Downward <stephen@stainless.com>: use HttpClient instead of HttpMessageInvoker PiperOrigin-RevId: 888155781
1 parent 3909b18 commit ed1e209

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Google.GenAI/ApiClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ public abstract class ApiClient : IDisposable, IAsyncDisposable
2929
{
3030
private static readonly string SdkVersion = GetSdkVersion();
3131

32-
private HttpMessageInvoker? _httpClient;
32+
private HttpClient? _httpClient;
3333
private readonly object _httpClientLock = new object();
3434

35-
protected HttpMessageInvoker HttpClient
35+
protected HttpClient HttpClient
3636
{
3737
get
3838
{

Google.GenAI/HttpApiClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public override async IAsyncEnumerable<ApiResponse> RequestStreamAsync(
151151
HttpRequestMessage request =
152152
await CreateHttpRequestAsync(httpMethod, path, requestJson, requestHttpOptions);
153153

154-
HttpResponseMessage response = await ((HttpClient)HttpClient).SendAsync(
154+
HttpResponseMessage response = await HttpClient.SendAsync(
155155
request,
156156
// Use ResponseHeadersRead to avoid buffering the entire response
157157
HttpCompletionOption.ResponseHeadersRead,

0 commit comments

Comments
 (0)