Skip to content
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

Bump RestSharp from 108.0.1 to 112.0.0 in /src/GregClient #110

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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