Skip to content

Commit 62d6f92

Browse files
authored
incorporated PR62 into this PR
Just in case the last change for non HTTP 2xx handling will be rejected once more and not to loose the latest changes, I added the setReadTimeout code from PR62
1 parent 568ac04 commit 62d6f92

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/main/java/com/docusign/esign/client/ApiClient.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public class ApiClient {
5757
private String basePath = "https://www.docusign.net/restapi";
5858
private boolean debugging = false;
5959
private int connectionTimeout = 0;
60+
private int readTimeout = 0;
6061

6162
private Client httpClient;
6263
private ObjectMapper mapper;
@@ -320,6 +321,24 @@ public ApiClient setConnectTimeout(int connectionTimeout) {
320321
return this;
321322
}
322323

324+
/**
325+
* Read timeout (in milliseconds).
326+
*/
327+
public int getReadTimeout() {
328+
return readTimeout;
329+
}
330+
331+
/**
332+
* Set the read timeout (in milliseconds).
333+
* A value of 0 means no timeout, otherwise values must be between 1 and
334+
* {@link Integer#MAX_VALUE}.
335+
*/
336+
public ApiClient setReadTimeout(int readTimeout) {
337+
this.readTimeout = readTimeout;
338+
httpClient.setReadTimeout(readTimeout);
339+
return this;
340+
}
341+
323342
/**
324343
* Get the date format used to parse/format date parameters.
325344
*/

0 commit comments

Comments
 (0)