Created
August 7, 2011 16:15
-
-
Save demian85/1130500 to your computer and use it in GitHub Desktop.
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 util = require('util'), | |
http = require('http'), | |
connect = require('connect'), | |
express = require('express'); | |
var app = express.createServer(); | |
app.configure(function(){ | |
app.use(express.bodyParser()); | |
app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); | |
}); | |
app.all('/', function(req, res, next) { | |
console.log("params:"); | |
console.log(req.params); | |
console.log('body:') | |
console.log(req.body); | |
res.send("Response!"); | |
}); | |
app.listen(8080); | |
// requesting http://localhost:8080/?a=9 via GET / POST | |
// prints... | |
// params: | |
// [] | |
// body: | |
// undefined | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Last ditch effort:
console.log(require('util').inspect(req, null, false));
And then wade through a page of information.