Skip to content
RobeeeJay edited this page Aug 23, 2012 · 2 revisions

This module processes form data that matches the content type "application/x-www-form-urlencoded" and places it into the request.body object.

new fw.BodySimple({ seperator: "&", equals: "=", query: "?", maxKeys: 100 });

All arguments are optional, and default to those shown above, apart from maxKeys which defaults to null.

You will probably never want or need to change any of these, but they are exposed just in case you want to.

Simple Example

var stackFull = new fw.Stack();

stackFull.append(new fw.BodySimple());

After the above, the destination of a route can access form data inside request.body, so if for instance a form was submitted with an INPUT field which has a NAME="password" and VALUE="same as my luggage", then request.body.password == "same as my luggage".

Clone this wiki locally