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
Uh oh!
There was an error while loading. Please reload this page.
-
OnFloopAsync) is a great feature to have, but should a Page with a model that explicitly definesOnGetbut notOnPostreally still acceptPOSTrequests, let aloneDELETEorQWDASR?/my-page/{handler?},GET /my-page/foomight correctly select theOnGetFoomethod, butGET /my-page/barwould just select theOnGetmethod ifOnGetBarwas not defined. Shouldn't it respond with404 Not Foundinstead?Beta Was this translation helpful? Give feedback.
All reactions