Module stick/middleware/params

This module provides middleware for parsing HTTP parameters from the query string and request body.

It does not parse multipart MIME data such as file uploads which are handled by the upload module.

Functions


middleware (next, app)

Middleware for parsing HTTP parameters. This module handles URL-endcoded form data transmitted in the query string and request body as well as JSON encoded data in the request body.

Parameters

Function next the wrapped middleware chain
Object app the Stick Application object

Returns

Function a JSGI middleware function

request.params

An object containing the parsed HTTP parameters sent with this request.


request.postParams

An object containing the parsed HTTP POST parameters sent with this request.


request.queryParams

An object containing the parsed HTTP query string parameters sent with this request.