# IDurableHttpClient.WaitForOperationAsync(DurableHttpOperation, DurableHttpOperationOptions?)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.idurablehttpclient/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.idurablehttpclient/methods/)

```csharp
public abstract DurableTask<TResult> WaitForOperationAsync<TResult>(DurableHttpOperation operation, DurableHttpOperationOptions? options = null)
```

Durably waits for an operation's result.

### Parameters

- `operation` (`DurableHttpOperation`): The operation which [IDurableHttpClient](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.idurablehttpclient/) returned.
- `options` (`DurableHttpOperationOptions?`): Configures the wait, or `null` for the defaults.

### Returns

A durable task which returns the operation's result.

### Exceptions

- `Orleans.Durable.Http.DurableHttpOperationException`: The operation failed or was canceled.
- `System.Net.Http.HttpRequestException`: A response has a status code which reports neither a status nor a result.
