You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minimal APIs handle the less-commonly used ones (OPTIONS, HEAD, CONNECT, TRACE) as well as the proposed QUERY method and any custom method a user might want to handle via the MapMethods() extension method like so:
varbuilder=WebApplication.CreateBuilder(args);varapp=builder.Build();// OPTIONS: /foo// HEAD: /fooapp.MapMethods("/foo",["OPTIONS","HEAD"],()=>"Options or head");// TRACE: /barapp.MapMethods("/bar",["TRACE"],(Datadata)=>$"Received {data.Name}");app.Run();
so it would be nice to have an attribute that can replicate this functionality, for example
Immediate.Apis
does not support all HTTP request methods, that is:Minimal APIs handle the less-commonly used ones (
OPTIONS
,HEAD
,CONNECT
,TRACE
) as well as the proposedQUERY
method and any custom method a user might want to handle via theMapMethods()
extension method like so:so it would be nice to have an attribute that can replicate this functionality, for example
The text was updated successfully, but these errors were encountered: