Open ritu-rubrik opened 2 months ago
Hi @ritu-rubrik, thanks for trying out the SDK. If you would like to override the Retry handler, you are able to do it when executing the command i.e here is an example. You will only need to provide the retry option in the request configuration
retryHandlerOptions := nethttplibrary.RetryHandlerOptions{
ShouldRetry: func(delay time.Duration, executionCount int, request *http.Request, response *http.Response) bool {
return false
},
}
opts := applications.ApplicationsRequestBuilderGetRequestConfiguration{
QueryParameters: &applications.ApplicationsRequestBuilderGetQueryParameters{
Select: []string{"displayName", "appId", "id", "keyCredentials", "passwordCredentials"},
Top: to.Ptr[int32](100),
},
Options: []abstractions.RequestOption{&retryHandlerOptions},
}
Currently while using middlewate I use this code to get the default lit of middlewares.
defaultClientOptions := msgraph.GetDefaultClientOptions() defaultMiddleWare := msgraphgocore.GetDefaultMiddlewaresWithOptions(&defaultClientOptions)
However, I am not sure how to override the Retry handler alone in this list of middlewares.
Looking for an example to do this/