Index: Src/GoogleApis/Apis/Http/IHttpUnsuccessfulResponseHandler.cs
===================================================================
--- a/Src/GoogleApis/Apis/Http/IHttpUnsuccessfulResponseHandler.cs
+++ b/Src/GoogleApis/Apis/Http/IHttpUnsuccessfulResponseHandler.cs
@@ -14,48 +14,45 @@
limitations under the License.
*/
-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 HandleUnsuccessfulResponseArgs
{
- /// Gets or sets the sent request.
+ /// Gets or sets the sent request.
public HttpRequestMessage Request { get; set; }
- /// Gets or sets the abnormal response.
+ /// Gets or sets the abnormal response.
public HttpResponseMessage Response { 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; }
}
- ///
- /// Unsuccessful response handler which is invoked when an abnormal Http response is returned when sending an Http
+ ///
+ /// Unsuccessful response handler which is invoked when an abnormal HTTP response is returned when sending a HTTP
/// request.
///
public interface IHttpUnsuccessfulResponseHandler
{
///
- /// Handles an abnormal response when sending an Http request.
+ /// Handles an abnormal response when sending a HTTP request.
/// A simple rule must be followed, if you modify the request object in a way that the abnormal response can
/// be resolved, you must return true.
///
@@ -63,6 +60,6 @@
/// Handle response argument which contains properties like the request, the response, current failed try.
///
/// Whether or not this handler has made a change that will require the request to be resent
- bool HandleResponse(HandleUnsuccessfulResponseArgs args);
+ Task HandleResponseAsync(HandleUnsuccessfulResponseArgs args);
}
}