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
It's very common in other frameworks to do REST routes as such:
(request: Request, h: ResponseToolkit): symbol => { if (request.method === 'post' && request.url.searchParams.has('_method')) { const override = request.url.searchParams.get('_method'); request.setMethod(override); } return h.continue; };
These are some example routes:
{ path: '/articles', method: 'POST', options: { validate: { payload: Joi.object({ name: Joi.string(), }); }, }, handler: store, }, { path: '/articles/{slug}', method: 'PUT', options: { validate: { payload: Joi.object({ name: Joi.string(), }); }, }, handler: save, },
POST will succeed, PUT will fail because
errors: { "crumb": "\"crumb\" is not allowed" }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It's very common in other frameworks to do REST routes as such:
These are some example routes:
POST will succeed, PUT will fail because
The text was updated successfully, but these errors were encountered: