Add content-type

This commit is contained in:
Roy Hyunjin Han 2014-11-30 05:17:22 -05:00
commit cbdf009d46
3 changed files with 22 additions and 13 deletions

View file

@ -2,7 +2,8 @@ var proxy = require('http-proxy').createProxyServer({
target: {host: 'localhost', port: 9000}
});
var server = require('http').createServer(function(req, res) {
console.log('[REQUEST] ' + req.url);
console.log('[REQUEST.%s] %s', req.method, req.url);
console.log(req['headers']);
if (req.method == 'POST') {
var body = '';
req.on('data', function (data) {