jenkinsci / jenkinsci/java-client-api

a Questions about httpClient

Aperta
#275 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
913
Fork
466
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

the source code in JenkinsHttpClient
a request to jenkins use CloseableHttpClient such as

public T get(String path, Class cls) throws IOException {
HttpGet getMethod = new HttpGet(api(path));

HttpResponse response = client.execute(getMethod, localContext);
getJenkinsVersionFromHeader(response);
try {
httpResponseValidator.validateResponse(response);
return objectFromResponse(cls, response);
} finally {
EntityUtils.consume(response.getEntity());
releaseConnection(getMethod);
}
}
, sometimes my request can't received by jenkins and Code should not be run to end, cause by my network is not stable , so how can i to add timeout for api ??

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.