StructuredMinimalApi icon indicating copy to clipboard operation
StructuredMinimalApi copied to clipboard

CancellationToken

Open amilcar-dev opened this issue 3 years ago • 1 comments

Hello! Is it possible to work with cancellation token on the request? Thanks for the project

amilcar-dev avatar Oct 09 '22 10:10 amilcar-dev

Did you try it this way? @amilcar-dev IEndpoint<MyResponseObject, MyRequestObject, CancellationToken>

kavatari avatar Nov 12 '22 13:11 kavatari

Hi As refer here https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-7.0#special-types You can use Cancellation token directly manage by minimal api SDK.

You can find an example here https://github.com/michelcedric/StructuredMinimalApi/blob/master/StructuredMinimalApi/Application/Todos/Commands/CreateTodo/CreateTodoEndpoint.cs#L24

michelcedric avatar Dec 19 '22 15:12 michelcedric