Add content-type
This commit is contained in:
parent
c3428e0b68
commit
cbdf009d46
3 changed files with 22 additions and 13 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue