Skip to content

Commit

Permalink
Update ApiClient to use max timeout option
Browse files Browse the repository at this point in the history
  • Loading branch information
alec-petersen committed Oct 15, 2024
1 parent 0a736a9 commit a51062b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,12 @@ namespace {{packageName}}.Client
var clientOptions = new RestClientOptions(baseUrl)
{
ClientCertificates = configuration.ClientCertificates,
{{#useMaxTimeout}}
MaxTimeout = configuration.Timeout,
{{/useMaxTimeout}}
{{^useMaxTimeout}}
Timeout = TimeSpan.FromMilliseconds(configuration.Timeout),
{{/useMaxTimeout}}
Proxy = configuration.Proxy,
UserAgent = configuration.UserAgent,
UseDefaultCredentials = configuration.UseDefaultCredentials,
Expand Down

0 comments on commit a51062b

Please sign in to comment.