async Nitro middleware
Hey, can Nitro middleware be
async
? I'm trying to figure it out but I get Nuxt error 402 HTTP method is not allowed.
when I make middleware async.6 Replies
Anyone?
can you show an example what you are doing in that middleware?
If you use
readBody
your route will throw a 405 in case you use any request method which does not can contain a Body e.g. a GET
.
Try so send a POST
, PUT
or some similar with body.
That was it! Of course, thank you!