jenkinsci / jenkinsci/java-client-api
a Questions about httpClient
- Dominant language
- Java
- Stars
- 913
- Forks
- 466
- PR merge metrics
- No merged PRs in 30d
Description
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 ??
Contributor guide
Assessment
This issue has not been assessed yet.