<PackageReference Include="Relativity.Server.Import.SDK" Version="2.9.2" />

RestClient

class RestClient
Represents a service class object to perform REST operations used by import/export API. This class cannot be inherited.
public int MaxRetryAttempts { get; set; }

Gets or sets the max retry attempts.

public double TimeoutSeconds { get; }

Gets the HTTP timeout.

public RestClient(RelativityInstanceInfo instance, ILog log, double timeoutSeconds, int maxRetryAttempts)

Initializes a new instance of the RestClient class.

public Task<string> RequestPostStringAsync(string relativeEndpoint, string content, Func<int, TimeSpan> sleepDurationProvider, Action<Exception, TimeSpan, Context> onRetry, Func<HttpStatusCode, string> onEndpointErrorTitle, Func<HttpStatusCode, string> onEndpointErrorMessage, CancellationToken token)

Performs an HTTP POST and returns the string response.