Alexander Minyaev
07/16/2020, 9:31 AMHttpClientFeature
after Exception
? Now, I have next code:
override fun install(feature: ExceptionFeature, scope: HttpClient) {
scope.sendPipeline.intercept(HttpSendPipeline.Before) {
for (counter in 0..2) {
try {
proceed()
break
} catch (e: IOException) {
println("IO Error :$counter")
if (counter == 2) {
throw e
}
}
}
}
e5l
07/16/2020, 9:32 AMHttpSend
feature for that. It allows you to repeat the request(as in HttpRedirect feature)Alexander Minyaev
07/16/2020, 10:23 AM