felixmosh / bull-board

🎯 Queue background jobs inspector
MIT License
2.14k stars 343 forks source link

The new version of @bull-board/h3 will report an error H3Error: HTTP method is not allowed. #757

Closed oevery closed 1 month ago

oevery commented 1 month ago

the new version add readbody, but in nuxt (or nitro and h3), using readBody within a GET request will throw a error.

this is the doc: https://nuxt.com/docs/guide/directory-structure/server#body-handling

image

felixmosh commented 1 month ago

Hi @oevery thank you for reporting this issue. Where there is Get request with readbody? Will you be able to submit a PR?

oevery commented 1 month ago

Hi @oevery thank you for reporting this issue. Where there is Get request with readbody? Will you be able to submit a PR?嗨,@oevery感谢您报告此问题。 哪里有 readbody 的 Get 请求? 你能提交 PR 吗?

https://github.com/felixmosh/bull-board/blob/e59360eef967253970436b281937ef2294434914/packages/h3/src/H3Adapter.ts#L178-#L188

In this case, readbody is read for each request, so it's just a matter of keeping them separate.

It's night time in my country, maybe I can get up tomorrow and submit a pr.