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