shouldRetry
Determines if a network request should be retried based on the provided parameters.
Return
A RetryPolicy indicating whether the request should be retried and the retry behavior.
Parameters
request
The HttpRequest object representing the request.
result
The NetworkResult object representing the result of the previous request attempt.
retryCount
The number of retry attempts made so far.