Function NetworkClient.attemptRequest

Attempt a request up to 'this.max_retries' attempts, and make the task wait this.retry_delay between each attempt.

auto attemptRequest(alias endpoint, NetworkClient.Throw DT, dtext.log.ILogger.ILogger.Level log_level = LogLevel.Trace, Args...) (
  auto ref Args args,
  string file = __FILE__,
  uint line = __LINE__
);

If all requests fail and 'ex' is not null, throw the exception.

Parameters

NameDescription
endpoint the API endpoint (e.g. API.postTransaction)
DT whether to throw an exception if the request failed after all attempted retries
log_level the logging level to use for logging failed requests
Args deduced
args the arguments to the API endpoint

Returns

the return value of of the API call, which may be void