More examples, for example, forms
Hi there!
I just found Hapi, from what I gathered on the net, there is no need for a BodyParser middleware as in Express/connect
app.use(express.bodyParser());
How is this handled in Hapi? Is there an eyample somehwere that I can look at?
Thanks
In https://github.com/spumko/hapi/blob/master/docs/Reference.md#route-options read the payload option.
By default, if you add a POST route, the payload will be parsed if it is text, json, or form-encoded.
@kokujin - A couple of unofficial examples with POST are here https://github.com/wpreul/hapi-example/
Mine also has various sample browser side code too https://github.com/paullang/hapi-post-example/
Added server example to hapi: https://github.com/spumko/hapi/pull/985 and tutorial to hapijs.com
Also, if you look at the cookie example it shows how to submit and read a form.