Skip to main content

Max attempts

Sets the maximum number of retry attempts for sending a request in case of 5** codes or client internal errors

Function MaxAttempts(Val Value) Export

ParameterCLI optionTypeRequiredDescription
Value-NumberRetry count
Returns

DataProcessorObject.OPI_HTTPClient - This processor object

tip

By default: 0

Caution

NOCLI: this method is not available in CLI version

1C:Enterprise/OneScript code example
Result = OPI_HTTPRequests.NewRequest()
.Initialize()
.MaxAttempts(10)
.ReturnSettings();
Result
{
"gzip": true,
"SplitArrayParams": false,
"ArraysSquareBrackets": false,
"URLencoding": true,
"EncodeRequestBody": "UTF-8",
"BodyFieldsAtOAuth": false,
"MaxAttempts": 10,
"MaxRedirects": 5
}