diff --git a/src/RestSharp/Options/RestClientOptions.cs b/src/RestSharp/Options/RestClientOptions.cs
index b251a3115..5e924d09f 100644
--- a/src/RestSharp/Options/RestClientOptions.cs
+++ b/src/RestSharp/Options/RestClientOptions.cs
@@ -181,6 +181,16 @@ public RestClientOptions(string baseUrl) : this(new Uri(Ensure.NotEmptyString(ba
///
public CookieContainer? CookieContainer { get; set; }
+ ///
+ /// Maximum request duration in milliseconds. When the request timeout is specified using ,
+ /// the lowest value between the client timeout and request timeout will be used.
+ ///
+ [Obsolete("Use Timeout instead.")]
+ public int MaxTimeout {
+ get => (int) (Timeout?.TotalMilliseconds ?? 0);
+ set => Timeout = TimeSpan.FromMilliseconds(value);
+ }
+
///
/// Request duration. Used when the request timeout is not specified using ,
///
diff --git a/src/RestSharp/RestClient.Extensions.cs b/src/RestSharp/RestClient.Extensions.cs
index 7e16487a7..27997aa01 100644
--- a/src/RestSharp/RestClient.Extensions.cs
+++ b/src/RestSharp/RestClient.Extensions.cs
@@ -20,7 +20,12 @@ namespace RestSharp;
[PublicAPI]
public static partial class RestClientExtensions {
[PublicAPI]
- public static ValueTask> Deserialize(this IRestClient client, RestResponse response, CancellationToken cancellationToken)
+ [Obsolete("Please use the async overload with a cancellation token")]
+ public static RestResponse Deserialize(this IRestClient client, RestResponse response)
+ => AsyncHelpers.RunSync(() => client.Serializers.Deserialize(response.Request, response, client.Options, CancellationToken.None).AsTask());
+
+ [PublicAPI]
+ public static ValueTask> Deserialize(this IRestClient client, RestResponse response, CancellationToken cancellationToken)
=> client.Serializers.Deserialize(response.Request, response, client.Options, cancellationToken);
///