box / box-windows-sdk-v2

Windows SDK for v2 of the Box API. The SDK is built upon .NET Framework 4.5

Home Page:https://developer.box.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do I set the time out for API calls?

jagsridharan opened this issue · comments

commented

Description of the Issue

Recently, i am getting a lot of time out issues when executing the Box.V2 or Box.V2.Core. Is there any way I can increase the time out?

Steps to Reproduce

  1. Execute any Box API related calls that are going to run for longer time
  2. Say BoxCollection items = await client.FoldersManager.GetFolderItemsAsync(item.Id, 1000, 0, fields);
  3. It fails with the time out issue

Expected Behavior

Execute the scripts without the time out issues

Error Message, Including Stack Trace

at Box.V2.Request.HttpRequestHandler.getResponse(IBoxRequest request, Boolean isStream, HttpRequestMessage httpRequest)\r\n at Box.V2.Request.HttpRequestHandler.ExecuteAsync[T](IBoxRequest request)\r\n at Box.V2.Services.BoxService.ToResponseAsync[T](IBoxRequest request)\r\n at Box.V2.Managers.BoxResourceManager.ExecuteRequest[T](IBoxRequest request, Boolean queueRequest)\r\n at Box.V2.Managers.BoxResourceManager.ToResponseAsync[T](IBoxRequest request, Boolean queueRequest)\r\n at Box.V2.Managers.BoxFoldersManager.GetFolderItemsAsync(String id, Int32 limit, Int32 offset, IEnumerable1 fields, Boolean autoPaginate, String sort, Nullable1 direction)\r\n

Screenshots

image

Versions Used

.Net SDK: v3.36.0
Windows: Windows 10 19041.1110

Hi @jagsridharan

Sorry for the late response. It's currently not possible to set timeout of a BoxClient. We have it already in our backlog and there exists an issue in the GitHub. We don't have it prioritized yet so I cannot give you any timeframe when this is coming to our SDK. Please follow the #538 for any updates.

Closing as duplicate.

Thanks,
@mwwoda