dotnet / dotnet/aspnetcore

Request Timeouts dynamically calculated

Open
#55,437 3 comments 2 reactions 0 assignees View on GitHub
api-suggestion area-middleware
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

I am trying to set the timeout of my request dynamically, but it seems it must be a constant value.

### Describe the solution you'd like

I would suggest that `UseRequestTimeouts` have a callback option with the request context to be evaluated and set the timeout value inside of this callback.

### Additional context

I am using .net in Lambda, and I could use `ILambdaContext.RemainingTime - buffer` to determine when the timeout should happen, but I don't see how to do so with the current implementation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.