Upgrading RestSharp 106 to 107
Breaking106.15.0 → 107.3.0Breaking10New8Changed5Fixed6Other6
BreakingUpgrade verdict
10 breaking changes.
In plain terms
- Unnecessary semicolon removed in v107 documentation.
- Removed default encoding for header parameters.
- Interface IRestClient is removed, use RestClient class instead.
- Interface IRestRequest is removed, use RestRequest class instead.
Must act Top 3 of 10 that need code or config changes
RestSharp publishes an official migration guide for version 107. It covers more than the release notes do.
Migration guide ↗Target frameworks requirement changed in 107.0.0-preview.1: .NETFramework4.5.2, .NETStandard2.0 → .NETStandard2.0, net5.0, net6.0.
Adds system.text.json 5.0.0.
What you must change
Breaking10
Unnecessary semicolon removed in v107 documentation.
Removed default encoding for header parameters.
Interface IRestClient is removed, use RestClient class instead.
IRestClientRestClientInterface IRestRequest is removed, use RestRequest class instead.
IRestRequestRestRequestInterface IRestResponse is removed, use RestResponse class instead.
IRestResponseRestResponseDefault JSON serializer is now using System.Text.Json, SimpleJson is gone.
System.Text.JsonSupport for .NET 4.5 is removed, for legacy .NET Framework use the .NET Standard package.
Most of the client options are now in RestClientOptions as they can't be changed after creating the HttpMessageHandler instance.
RestClientOptionsHttpMessageHandlerParameter is now an abstract record.
ParameterQueryParameterAll synchronous methods are gone, use asynchronous methods instead.