Changelog
For release notes of previous versions, please check the Releases page in RestSharp GitHub repository.
Changes between major versions are documented in the documentation for each version on this website.
v114.1
New features
TrailingHeadersonRestResponse— HTTP response trailers (RFC 9110 trailer fields) are now exposed as a separateTrailingHeaderscollection, kept apart fromHeadersandContentHeaders. Trailers are populated on .NET 8 and later after the response content has been read; on .NET Framework and .NET Standard the collection is always empty. (#2414)
Behavior changes
- Default serializers are registered lazily —
RestClientno longer instantiates the built-inSystem.Text.Jsonserializer before theconfigureSerializationcallback runs. Replacing the JSON serializer (for example withUseNewtonsoftJson()) now avoids loadingSystem.Text.Jsonat all, which fixes assembly binding failures in .NET Framework plugin scenarios. (#2403) - Synchronous
Executemethods run on the thread pool — the sync-over-async bridge now usesTask.RunandGetAwaiter().GetResult()instead of a custom synchronization context, preventing deadlocks when calling the synchronous API from a UI or ASP.NET synchronization context. (#2371)
Bug fixes
- Fix
AddObjectStaticthrowingNullReferenceExceptionwhen any property of the object isnull. Null properties are now skipped, consistent withAddObject. (#2401)
Dependencies
RestSharp.Serializers.CsvHelpernow depends on CsvHelper 33.1.0. (#2378)
v114.0
Breaking changes
IAuthenticatorinterface signature changed —Authenticatenow accepts an optionalCancellationTokenparameter. All custom authenticator implementations must be recompiled. (#2362)FollowRedirectsandMaxRedirectsremoved fromReadOnlyRestClientOptions— these properties are now excluded from the generated immutable wrapper. UseRedirectOptionsinstead. Code accessing these properties onReadOnlyRestClientOptionsmust be updated. (#2360)- Extension method signatures changed —
AddParameter<T>,AddOrUpdateParameter<T>,AddHeader<T>,AddOrUpdateHeader<T>,AddQueryParameter<T>, andAddUrlSegment<T>now have an additional optionalCultureInfo? cultureparameter. Assemblies compiled against v113 must be recompiled. (#2354)
New features
- OAuth2 token lifecycle authenticators — new
OAuth2ClientCredentialsAuthenticator,OAuth2RefreshTokenAuthenticator, andOAuth2TokenAuthenticatorthat handle obtaining, caching, and refreshing tokens automatically. (#2362) - Custom redirect handling with
RedirectOptions— RestSharp now manages redirects internally instead of delegating toHttpClient, fixing lostSet-Cookieheaders on redirects. NewRedirectOptionsclass provides fine-grained control over redirect behavior. (#2360) MergedParametersonRestResponse— provides a combined view of request and default parameters at execution time, useful for logging and debugging. (#2349)- Restored
AddCookie(name, value)overload — the simple two-parameter form defers domain resolution to execution time. (#2351)
Behavior changes
MultipartFormQuoteParametersnow defaults totrue— multipart form parameter names are now quoted per RFC 7578. (#2357)InvariantCultureused for parameter formatting — all generic parameter methods now format values usingCultureInfo.InvariantCultureby default. Pass aCultureInfoexplicitly if locale-specific formatting is needed. (#2354)- Improved
ErrorMessagefor timeouts — now shows"The request timed out."instead of"A task was canceled.". (#2356) ErrorMessagesurfaces root cause — usesGetBaseException().Messageto show the actual error instead of generic wrapper messages. (#2352)HttpClient.DefaultRequestHeadersno longer modified —Expect100Continueis now set per-request. Safe to share anHttpClientacross multipleRestClientinstances. (#2363)
Bug fixes
- Fix
ConfigureAwait(false)missing on severalawaitcalls, preventing deadlocks in sync-over-async scenarios. (#2367) - Fix
ResponseUrireturning original URL instead of redirect target whenFollowRedirects=false. (#2350) - Fix default parameter merging bugs (multi-value dedup, request mutation,
BuildUriStringwithout execute). (#2349) - Fix OAuth1 double-encoding of RFC 3986 special characters in URL paths. (#2341)
- Fix pipe character encoding when
AddQueryParameteris used withencode=false. (#2345) - Fix
XmlDeserializerwhen XML uses same tag name in nested elements. (#2339) - Fix credential/
UseDefaultCredentialsproperty order onHttpClientHandler. (#2353) - Fix URL escaping on .NET Framework 4.6.2. (#2327)