Skip to content

Instantly share code, notes, and snippets.

@brianedgerton brianedgerton/app.js Secret
Created Mar 20, 2013

Embed
What would you like to do?
Connect Middleware Issue
var connect = require( "connect" ),
flatiron = require( "flatiron" ),
app = flatiron.app;
app.use( flatiron.plugins.http, {
buffer: false,
before: [
connect.bodyParser(),
function( req, res ) {
// This works fine here
console.log( req.body );
res.emit( 'next' );
}
]
})
app.router.get( '/someroute', function() {
console.log( this.req.body ); // Empty object
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.