IDurableHttpClient
Namespace: Orleans.Durable.Http
public interface IDurableHttpClientRemarks
Each method which returns a durable task records its responses as steps of the calling task: a replay reads the recorded response without sending the request again, and a step which a failure or a deactivation interrupts sends its request again with the same Idempotency-Key, which identifies the step. Requests with safe methods, such as GET, carry no key. Call these methods from durable executions, such as durable grain methods, in silos.
Operations follow the conventions which this package's durable operation endpoints serve, which are compatible with Azure long-running operations: a 202 Accepted response locates the operation's status monitor with Operation-Location, which POST {status monitor}:cancel cancels and POST {status monitor}/signals/{name} signals. IDurableHttpClient also waits for operations which Azure services, and servers which answer 202 Accepted with a Location, run.
Register a client with AddDurableHttpClient, which returns the builder of its System.Net.Http.HttpClient, and inject it as a keyed service with the client's name.
Methods
CancelOperationAsync(Uri, string?)Requests cancellation of an operation withPOST {status monitor}:cancel, as a step of the calling task.GetOperationAsync(Uri)Reads an operation's status monitor, as a step of the calling task.SendAsync(Func<HttpRequestMessage>)Sends the request whichcreateRequestcreates, as a step of the calling task.SignalOperationAsync(Uri, string, T)Delivers a signal with a JSON value to an operation withPOST {status monitor}/signals/{name}, as a step of the calling task.StartOperationAsync(Func<HttpRequestMessage>)Sends the request which starts an operation, as a step of the calling task, and returns the operation.WaitForOperationAsync(DurableHttpOperation, DurableHttpOperationOptions?)Durably waits for an operation's result.WatchOperationAsync(Uri, CancellationToken)Streams an operation's statuses from the server-sent events of{status monitor}/eventsuntil the operation is terminal.
