# RetryInterceptor

class RetryInterceptor(@IntRange(from = 1.toLong()) retryCount: Int) : Interceptor
Content copied to clipboard

重试次数拦截器 OkHttp自带重试请求规则, 本拦截器并不推荐使用 因为长时间阻塞用户请求是不合理的, 发生错误请让用户主动重试, 例如显示缺省页或者提示

## Constructors

RetryInterceptor
Link copied to clipboard
fun RetryInterceptor(@IntRange(from = 1.toLong()) retryCount: Int = 3)
Content copied to clipboard

## Functions

intercept
Link copied to clipboard
open override fun intercept(chain: Interceptor.Chain): Response
Content copied to clipboard

## Properties

retryCount
Link copied to clipboard
var retryCount: Int = 3
Content copied to clipboard
重试次数