custom bodyDecoder for Express in node.js server

I'm trying to figure out how to override the Express.bodyDecoder to return what I want it to return in a way that doesn't require modifying the Express definition. I feel like I could implement it right now but I don't know the "right way". Help?

-------------Problems Reply------------

You can copy the Connect bodyParser (which is passed up through Express) and modify it to taste, then call your modified version rather than express's in your app configuration. Example:

var express = require('express'),
myBodyParser = require('myBodyParser');

var app = express.createServer(
myBodyParser()
);

Category:javascript Views:1 Time:2011-02-25

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.143 (s). 11 q(s)