jenkinsci / jenkinsci/java-client-api

a Questions about httpClient

Offen
#275 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
913
Forks
466
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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 ??

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start with JenkinsHttpClient and the CloseableHttpClient used by get(String path, Class), then trace how requests are executed through api(path). Define the expected timeout behavior for unstable network requests and verify that the request no longer waits indefinitely when the timeout is reached.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
api
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.