Set timeout
Sets the connection timeout
Function SetTimeout(Val Value) Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Value | - | Number | ✔ | Connection timeout |
Returns: DataProcessorObject.OPI_HTTPClient - This processor object
tip
Default timeout is 3600 seconds
caution
NOCLI: this method is not available in CLI version
1C:Enterprise/OneScript code example
URL = "https://httpbin.org";
URL = URL + "/get";
Result = OPI_HTTPRequests.NewRequest()
.Initialize()
.SetURL(URL)
.SetTimeout(60) // <---
.ProcessRequest("GET", False)
.ReturnConnection();
Result
NOT JSON: HTTPСоединение