-
Notifications
You must be signed in to change notification settings - Fork 4
🌿 Fern Regeneration -- August 26, 2024 #47
Conversation
| BaseUrl = _client.Options.BaseUrl, | ||
| Method = HttpMethod.Get, | ||
| Path = $"v2/transcript/{transcriptId}/{formatSlug}", | ||
| Path = $"v2/transcript/{transcriptId}/{subtitleFormat}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be subtitleFormat.Stringify().
| public HttpClient HttpClient { get; init; } = new HttpClient(); | ||
|
|
||
| /// <summary> | ||
| /// The http client used to make requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doc comment is incorrect.
| }, | ||
| cancellationToken | ||
| ); | ||
| var responseBody = await response.Raw.Content.ReadAsStringAsync(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cancellationToken should be passed to response.Raw.Content.ReadAsStringAsync too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything that's async usually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also .ConfigureAwait(false)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to use conditional compilation tho:
#if NET6_0_OR_GREATER
var responseBody = await response.Raw.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
#else
var responseBody = await response.Raw.Content.ReadAsStringAsync().ConfigureAwait(false);
#endif
This PR regenerates code to match the latest API Definition.