RetryProtocol
public protocol RetryProtocol
Protocol for handling retries for network requests
-
Decide on retry in case of success
Declaration
Swift
func retryChoice(for request: ServiceRequest, with response: Response) -> RetryChoice
Parameters
request
Request to retry
response
Response receiver from service
Return Value
Retry choice
-
Decire on retry in case of error
Declaration
Swift
func retryChoice(for request: ServiceRequest, with error: Error) -> RetryChoice
Parameters
request
Request to retry
error
Response receiver from service
Return Value
Retry choice