dapr / dapr/dotnet-sdk

[Proposal] Pass timeout for Dapr Http Request from DaprClient .Net sdk

Open
#1,182 3 comments 1 reaction 0 assignees View on GitHub
area/client/invoke
Dominant language
C#
Stars
1.2k
Forks
378
Avg merge
2d 1h
Merged PRs (30d)
6

Description

Ability to pass or configure timeout option for service invocation to DaprClient.

Suggestion:

Option 1:

var daprClient = new DaprClientBuilder().Build();
daprClient.httpTimeout = 60; // timeout in second

Option 2:

DaprOptions daprOptions = new() { timeout = 60; method = HttpMethod.Post.ToString() } // Future proof can be used to set more such options in the future

daprClient.InvokeMethodAsync(appId, methodName, daprOptions , cancellationToken);

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the DaprClient service-invocation API, especially InvokeMethodAsync and its cancellationToken parameter. Clarify whether timeout should be configured on DaprClient or passed through a DaprOptions object, then define the expected behavior and tests for a 60-second timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.