Skip to content

Commit 7b0d3f8

Browse files
fix(csharp): Remove delay on HTTP Streaming when response is not fully finished. (#9983)
Use HttpCompletionOption.ResponseHeadersRead in RawClient sendAsync
1 parent bcf0186 commit 7b0d3f8

File tree

189 files changed

+8931
-234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+8931
-234
lines changed

generators/csharp/base/src/asIs/RawClient.Template.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ CancellationToken cancellationToken
125125
{
126126
var httpClient = options?.HttpClient ?? Options.HttpClient;
127127
var maxRetries = options?.MaxRetries ?? Options.MaxRetries;
128-
var response = await httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false);
128+
var response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
129129
var isRetryableContent = IsRetryableContent(request);
130130

131131
if (!isRetryableContent)
@@ -144,7 +144,7 @@ CancellationToken cancellationToken
144144
await SystemTask.Delay(delayMs, cancellationToken).ConfigureAwait(false);
145145
using var retryRequest = await CloneRequestAsync(request).ConfigureAwait(false);
146146
response = await httpClient
147-
.SendAsync(retryRequest, cancellationToken)
147+
.SendAsync(retryRequest, HttpCompletionOption.ResponseHeadersRead, cancellationToken)
148148
.ConfigureAwait(false);
149149
}
150150

generators/csharp/sdk/versions.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# yaml-language-server: $schema=../../../fern-versions-yml.schema.json
2+
- version: 2.4.4
3+
changelogEntry:
4+
- type: fix
5+
summary: |
6+
When sending the HTTP request, allow the response to start processing before the entire body is read.
7+
createdAt: "2025-10-20"
8+
irVersion: 61
9+
210
- version: 2.4.3
311
changelogEntry:
412
- type: fix

seed/csharp-sdk/accept-header/src/SeedAccept/Core/RawClient.cs

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

seed/csharp-sdk/alias-extends/src/SeedAliasExtends/Core/RawClient.cs

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

seed/csharp-sdk/alias/src/SeedAlias/Core/RawClient.cs

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

seed/csharp-sdk/any-auth/src/SeedAnyAuth/Core/RawClient.cs

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

seed/csharp-sdk/api-wide-base-path/src/SeedApiWideBasePath/Core/RawClient.cs

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

seed/csharp-sdk/audiences/src/SeedAudiences/Core/RawClient.cs

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

seed/csharp-sdk/auth-environment-variables/src/SeedAuthEnvironmentVariables/Core/RawClient.cs

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

seed/csharp-sdk/basic-auth-environment-variables/src/SeedBasicAuthEnvironmentVariables/Core/RawClient.cs

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)