Skip to content

IDurableHttpClient

interface

Namespace: Orleans.Durable.Http

Sends HTTP requests and runs HTTP operations as steps of durable tasks, so retries and replays of a task reach the same server-side work.
public interface IDurableHttpClient

Remarks

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