We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NodeJS: 8.6.0 npm: 5.2.0 OS: Max OS X 10.12.2 koa: 2.4.1 koa-joi-router: 5.0.0 koa-bodyparser: 4.2.0 koa-body: 2.5.0
For the following app:
const koa = require('koa'); const router = require('koa-joi-router'); const bodyParser = require('koa-bodyparser'); const public = router(); public.route({ method: 'post', path: '/foo', validate: { type: 'json', }, handler: async (ctx) => { ctx.status = 201; } }); const app = new koa(); app.use(bodyParser()); app.use(public.middleware()); app.listen(2999);
the request hangs. The same if koa-body used instead if koa-bodyparser.
koa-body
koa-bodyparser
I need a koa body parser to be able to use request body in the middlewares.
The text was updated successfully, but these errors were encountered:
I fixed it in #64
Sorry, something went wrong.
If you do not want joi-router to parse the payload, do not specify validate.type. See https://github.com/koajs/joi-router#handling-non-validated-input
joi-router
validate.type
But if I do not specify the validate.type, the joi-router throw an error says "validate.type must be declared when using validate.body"
@aheckmann that does not work.
No branches or pull requests
NodeJS: 8.6.0
npm: 5.2.0
OS: Max OS X 10.12.2
koa: 2.4.1
koa-joi-router: 5.0.0
koa-bodyparser: 4.2.0
koa-body: 2.5.0
For the following app:
the request hangs. The same if
koa-body
used instead ifkoa-bodyparser
.I need a koa body parser to be able to use request body in the middlewares.
The text was updated successfully, but these errors were encountered: