Share via


BaseRequestExtensions.WithShouldRetry<T> Method

Definition

Sets a ShouldRetry delegate to the default Retry Middleware Handler for this request. This only works with the default Retry Middleware Handler. If you use a custom Retry Middleware Handler, you have to handle it's retrieval in your implementation.

public static T WithShouldRetry<T> (this T baseRequest, Func<int,int,System.Net.Http.HttpResponseMessage,bool> shouldRetry) where T : Microsoft.Graph.IBaseRequest;
static member WithShouldRetry : 'T * Func<int, int, System.Net.Http.HttpResponseMessage, bool> -> 'T (requires 'T :> Microsoft.Graph.IBaseRequest)
<Extension()>
Public Function WithShouldRetry(Of T As IBaseRequest) (baseRequest As T, shouldRetry As Func(Of Integer, Integer, HttpResponseMessage, Boolean)) As T

Type Parameters

T

Parameters

baseRequest
T

The BaseRequest for the request.

Returns

T

Applies to