-
Notifications
You must be signed in to change notification settings - Fork 4
BodyJSON
RobeeeJay edited this page Aug 23, 2012
·
2 revisions
This module processes data that matches the content type "application/json" and places it into the request.body object.
new fw.BodyJSON({ });
At present, it accepts no specific arguments.
var stackFull = new fw.Stack();
stackFull.append(new fw.BodyJSON());
After the above, the destination of a route can access JSON submitted form data inside request.body, so if for instance a form was submitted via AJAX and JSON with an INPUT field which has a NAME="password" and VALUE="same as my luggage", then request.body.password == "same as my luggage".