You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setters in ApiClient for setConnectTimeout, setReadTimeout (see PR #62), and setDebugging are very helpful for debugging and stability.
However these settings get only active after authentication, but not for OAUTH interaction.
I.e., if the system connects to the oAuthBasePath during authentication with authName "docusignAccessCode", these settings are not active yet in the httpClient, which is created in the default constructor (see ApiClient.java:81).
It would be great, if we could have an extension of the following constructor into a new one:
public ApiClient(String oAuthBasePath, String authName, String clientId, String secret, int connectTimeout, int readTimeout, boolean isDebugging)
The new constructor can apply the setters in this sequence: setDebugging (first), setConnectTimeout, setReadTimeout.
setDebugging will create the new httpClient before the timeouts will be set on this new httpClient.
Afterwards, the following lines will use the client with the new setting:
ApiClient.java:109 ---> auth = new OAuth(httpClient, OAuthFlow.accessCode, oAuthBasePath + "/oauth/auth", oAuthBasePath + "/oauth/token", "all");
The text was updated successfully, but these errors were encountered:
@psytester there is no need to modify the tons of existing constructors just to add these settings while we already provide the methods to pass all what you mentionned. Here is a code snippet that illustrates how you can achieve that today: ApiClient apiClient = new ApiClient(oAuthBasePath, authName, clientId, secret); apiClient.setDebugging(isDebugging); apiClient.setConnectTimeout(connectTimeout); apiClient.setReadTimeout(readTimeout);
Setters in ApiClient for setConnectTimeout, setReadTimeout (see PR #62), and setDebugging are very helpful for debugging and stability.
However these settings get only active after authentication, but not for OAUTH interaction.
I.e., if the system connects to the oAuthBasePath during authentication with authName "docusignAccessCode", these settings are not active yet in the httpClient, which is created in the default constructor (see ApiClient.java:81).
It would be great, if we could have an extension of the following constructor into a new one:
ApiClient.java:134: --->
public ApiClient(String oAuthBasePath, String authName, String clientId, String secret)
New constructor:
public ApiClient(String oAuthBasePath, String authName, String clientId, String secret, int connectTimeout, int readTimeout, boolean isDebugging)
The new constructor can apply the setters in this sequence: setDebugging (first), setConnectTimeout, setReadTimeout.
setDebugging will create the new httpClient before the timeouts will be set on this new httpClient.
Afterwards, the following lines will use the client with the new setting:
ApiClient.java:109 ---> auth = new OAuth(httpClient, OAuthFlow.accessCode, oAuthBasePath + "/oauth/auth", oAuthBasePath + "/oauth/token", "all");
The text was updated successfully, but these errors were encountered: