java: apache HttpClient > how to disable retry

前端 未结 5 2048
再見小時候
再見小時候 2021-02-01 16:41

I\'m using Apache Httpclient for Ajax-calls on a website. In some cases requests to external webservice fail, often with:

I/O exception (java.net.ConnectException) caug

5条回答
  •  臣服心动
    2021-02-01 17:06

    From httpclient 4.3 use HttpClientBuilder

    HttpClientBuilder.create().disableAutomaticRetries().build();
    

提交回复
热议问题