dodyg / practical-aspnetcore

Practical samples of ASP.NET Core 8.0, 7.0, 6.0, 5.0, 3.1, 2.2, and 2.1,projects you can use. Readme contains explanations on all projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create sample for RequestTimeout attribute

dodyg opened this issue · comments

Hi @dodyg. could you please show the code to use the RequestTimeout attribute?
already registered the service using builder.Services.AddRequestTimeouts() and app.UseRequestTimeouts(). but when I try to use the attribute in the controller, it doesn't seems to work

[RequestTimeout(milliseconds: 1)]
public override IActionResult GetList()
{
//...
}