Index: Src/GoogleApis/Apis/Http/IHttpExceptionHandler.cs
===================================================================
--- a/Src/GoogleApis/Apis/Http/IHttpExceptionHandler.cs
+++ b/Src/GoogleApis/Apis/Http/IHttpExceptionHandler.cs
@@ -15,46 +15,44 @@
*/
using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Net.Http;
-using System.Text;
using System.Threading;
+using System.Threading.Tasks;
namespace Google.Apis.Http
{
- /// Argument class to .
+ /// Argument class to .
public class HandleExceptionArgs
{
- /// Gets or sets the sent request.
+ /// Gets or sets the sent request.
public HttpRequestMessage Request { get; set; }
- /// Gets or sets the exception which occurred during sending the request.
+ /// Gets or sets the exception which occurred during sending the request.
public Exception Exception { get; set; }
- /// Gets or sets the total number of tries to send the request.
+ /// Gets or sets the total number of tries to send the request.
public int TotalTries { get; set; }
- /// Gets or sets the current failed try.
+ /// Gets or sets the current failed try.
public int CurrentFailedTry { get; set; }
- /// Gets whether there will actually be a retry if the handler returns true.
+ /// Gets whether there will actually be a retry if the handler returns true.
public bool SupportsRetry
{
get { return TotalTries - CurrentFailedTry > 0; }
}
- /// Gets and sets the cancellation token which belongs to the request.
+ /// Gets and sets the cancellation token which belongs to the request.
public CancellationToken CancellationToken { get; set; }
}
- ///
- /// Exception handler which is invoked when an exception is thrown during an Http request.
+ ///
+ /// Exception handler which is invoked when an exception is thrown during a HTTP request.
///
public interface IHttpExceptionHandler
{
///
- /// Handles an exception thrown when sending an Http request.
+ /// Handles an exception thrown when sending a HTTP request.
/// A simple rule must be followed, if you modify the request object in a way that the exception can be
/// resolved, you must return true.
///
@@ -62,6 +60,6 @@
/// Handle exception argument which contains properties like the request, the exception, current failed try.
///
/// Whether or not this handler has made a change that will require the request to be resent
- bool HandleException(HandleExceptionArgs args);
+ Task HandleExceptionAsync(HandleExceptionArgs args);
}
}