-
-
Save brianedgerton/9cef3bf2634a3b17d956 to your computer and use it in GitHub Desktop.
Connect Middleware Issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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