在开发时能够借鉴java
//post,delete,put请求在admin server处理超时状况下不重试 private boolean canRetry(Throwable e, HttpMethod method) { Throwable nestedException = e.getCause(); if (method == HttpMethod.GET) { return nestedException instanceof SocketTimeoutException || nestedException instanceof HttpHostConnectException || nestedException instanceof ConnectTimeoutException; } else { return nestedException instanceof HttpHostConnectException || nestedException instanceof ConnectTimeoutException; } }