Modifier

Partager via


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.

HttpClient Data Type
Get Started with AL
Developing Extensions