# DurableIdempotencyKeyHandler Constructors

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durableidempotencykeyhandler/)

## DurableIdempotencyKeyHandler(IGrainContextAccessor, IOptions&lt;ClusterOptions&gt;) {#constructor-orleans-runtime-igraincontextaccessor-microsoft-extensions-options-i-12fff5a5}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durableidempotencykeyhandler/constructors/constructor-orleans-runtime-igraincontextaccessor-microsoft-extensions-options-i-12fff5a5/)

[Source](https://github.com/dotnet/orleans/blob/4e887e9c914a2f2647fb3c81de963511521dd9cb/src/Orleans.Durable.Http/DurableIdempotencyKeyHandler.cs#L33-L36)

```csharp
public DurableIdempotencyKeyHandler(IGrainContextAccessor grainContextAccessor, IOptions<ClusterOptions> clusterOptions)
```

Adds an `Idempotency-Key` header which identifies the running durable task to each request that a durable task sends, so every attempt and replay of the task sends the same key.

### Parameters

- `grainContextAccessor` (`IGrainContextAccessor`)
- `clusterOptions` (`IOptions<ClusterOptions>`)
