HttpClient.Timeout([Duration]) Method
Version: Available or changed with runtime version 1.0.
Gets or sets the duration in milliseconds to wait before the request times out.
Syntax
[CurrentTimeout := ] HttpClient.Timeout([SetTimeout: Duration])
Note
This method can be invoked using property access syntax.
Parameters
HttpClient
Type: HttpClient
An instance of the HttpClient data type.
[Optional] SetTimeout
Type: Duration
The duration in milliseconds to wait before the request times out.
Return Value
[Optional] CurrentTimeout
Type: Duration
The duration in milliseconds to wait before the request times out.
Remarks
If you don't set a duration, then a default value is used. The default value is currently 100000 ms (100 seconds).
The SetTimeout duration is limited by the NavHttpClientMaxTimeout parameter that is configured for Business Central Server instance. If you set the duration to a value that is greater than the value of the NavHttpClientMaxTimeout parameter, a 'NavNclHttpClientTimeoutTooLargeException' error is thrown. The default value of the NavHttpClientMaxTimeout parameter is 00:05:00. To change the NavHttpClientMaxTimeout parameter, see Configuring Business Central Server.
See Also
HttpClient Data Type
Get Started with AL
Developing Extensions
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈