Wrong method middleware for one-method endpoints #1860
Unanswered
kolyasapphire
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I was wondering if it's possible to access my app's routes info from middleware like you can do with
new Hono().routes
?I'm trying to see if it's possible to create a middleware which would tell users that they are trying to use a wrong method for an endpoint instead of a generic 404 error. Eg
GET
for/data
when our API only hasPOST
for/data
.Beta Was this translation helpful? Give feedback.
All reactions