-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌿 Fern Regeneration -- August 26, 2024 #47
Conversation
var response = await _client.MakeRequestAsync( | ||
new RawClient.JsonApiRequest | ||
{ | ||
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()
.
/// </summary> | ||
public UserAgent UserAgent { get; set; } = new(); | ||
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.
} | ||
Options = options, | ||
}, | ||
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.