Skip to content

Commit

Permalink
Bump RestSharp from 108.0.1 to 112.0.0 in /src/GregClient (#110)
Browse files Browse the repository at this point in the history
* Bump RestSharp from 108.0.1 to 112.0.0 in /src/GregClient

Bumps [RestSharp](https://github.com/restsharp/RestSharp) from 108.0.1 to 112.0.0.
- [Release notes](https://github.com/restsharp/RestSharp/releases)
- [Commits](restsharp/RestSharp@108.0.1...112.0.0)

---
updated-dependencies:
- dependency-name: RestSharp
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update TimeOut assignment

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron (Qilong) <[email protected]>
  • Loading branch information
dependabot[bot] and QilongTang authored Sep 20, 2024
1 parent 52952e4 commit 64c4765
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/GregClient/GregClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ private RestResponse ExecuteInternal(Request m)
if (timeoutSetting != null)
{
// Timeout App Settings is in seconds.
// RestRequest.Timeout is in milliseconds.
// RestRequest.Timeout is now timespan object for clarity from RestSharp 112.0.0
var userVal = Convert.ToInt32(timeoutSetting);
// Sanity check.
if (userVal >= 0 && userVal < 86400/*24 hours*/)
{
req.Timeout = Convert.ToInt32(timeoutSetting) * 1000;// get milliseconds
req.Timeout = TimeSpan.FromSeconds(userVal);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/GregClient/GregClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</PropertyGroup>

<ItemGroup Label="Common package dependencies">
<PackageReference Include="RestSharp" Version="108.0.1" />
<PackageReference Include="RestSharp" Version="112.0.0" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\CHANGELOG.md">
Expand Down
2 changes: 1 addition & 1 deletion src/GregClient/Requests/JSONRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public abstract class JsonRequest : Request
// Ex: Timeout property
internal void InitReqParams(ref RestRequest request)
{
request.Timeout = Timeout;
request.Timeout = TimeSpan.FromMilliseconds(Timeout);
}

internal override void Build(ref RestRequest request)
Expand Down

0 comments on commit 64c4765

Please sign in to comment.