Skip to content

Upgrading RestSharp 106 to 107

Breaking106.15.0 → 107.3.0Breaking10New8Changed5Fixed6Other6

BreakingUpgrade verdict

10 breaking changes.

  • 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.
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.

Breaking10
Unnecessary semicolon removed in v107 documentation.
Removed default encoding for header parameters.
Interface IRestClient is removed, use RestClient class instead.
IRestClientRestClient
Interface IRestRequest is removed, use RestRequest class instead.
IRestRequestRestRequest
Interface IRestResponse is removed, use RestResponse class instead.
IRestResponseRestResponse
Default JSON serializer is now using System.Text.Json, SimpleJson is gone.
System.Text.Json
Support 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.
RestClientOptionsHttpMessageHandler
Parameter is now an abstract record.
ParameterQueryParameter
All synchronous methods are gone, use asynchronous methods instead.