語言

IHttpRequestRetryHandler.RetryRequest 方法

定義

判斷執行過程中發生 IOEception 後,是否需要重試某方法。

[Android.Runtime.Register("retryRequest", "(Ljava/io/IOException;ILorg/apache/http/protocol/HttpContext;)Z", "GetRetryRequest_Ljava_io_IOException_ILorg_apache_http_protocol_HttpContext_Handler:Org.Apache.Http.Client.IHttpRequestRetryHandlerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool RetryRequest(Java.IO.IOException? exception, int executionCount, Org.Apache.Http.Protocol.IHttpContext? context);
[<Android.Runtime.Register("retryRequest", "(Ljava/io/IOException;ILorg/apache/http/protocol/HttpContext;)Z", "GetRetryRequest_Ljava_io_IOException_ILorg_apache_http_protocol_HttpContext_Handler:Org.Apache.Http.Client.IHttpRequestRetryHandlerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member RetryRequest : Java.IO.IOException * int * Org.Apache.Http.Protocol.IHttpContext -> bool

參數

exception
IOException

發生的例外

executionCount
Int32

此方法執行失敗的次數

context
IHttpContext

請求執行的上下文

傳回

true是否應該重試該方法;否則,。 false

屬性

備註

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於