cojs / co-body

Parse request bodies with co
MIT License
325 stars 42 forks source link

fix: allow multiple body parser coexist #59

Open tangxinfa opened 7 years ago

tangxinfa commented 7 years ago

by sync listen events on ctx.req, multiple body parser coexist is safe.

json parser's returnRawBody option can provide untouched request body, we can use it to do signature validation if required, but co-body commonly use by high level middlewares, and not expose a option for user to customize.

allow multiple body parser coexist is a more elegant solution.