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
The ability to define methods on the page model that can handle any HTTP method one would like (even OnFloopAsync) is a great feature to have, but should a Page with a model that explicitly defines OnGet but not OnPost really still accept POST requests, let alone DELETE or QWDASR?
If a Page has a route template like /my-page/{handler?}, GET /my-page/foo might correctly select the OnGetFoo method, but GET /my-page/bar would just select the OnGet method if OnGetBar was not defined. Shouldn't it respond with 404 Not Found instead?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
OnFloopAsync
) is a great feature to have, but should a Page with a model that explicitly definesOnGet
but notOnPost
really still acceptPOST
requests, let aloneDELETE
orQWDASR
?/my-page/{handler?}
,GET /my-page/foo
might correctly select theOnGetFoo
method, butGET /my-page/bar
would just select theOnGet
method ifOnGetBar
was not defined. Shouldn't it respond with404 Not Found
instead?Beta Was this translation helpful? Give feedback.
All reactions