Commit e303a718e9d73015163e2b730fc3f60ac30bc448
1 parent
734375d449
Exists in
master
penanganan sn
Showing 1 changed file with 14 additions and 3 deletions Side-by-side Diff
partner-datacell.js
... | ... | @@ -118,11 +118,22 @@ function topupRequest(task, retry) { |
118 | 118 | } |
119 | 119 | |
120 | 120 | function createServer() { |
121 | + | |
121 | 122 | var httpServer = http.createServer(function(req, res) { |
122 | 123 | console.log('Got request from partner, url: ' + req.url); |
123 | - console.log('REQ:'); | |
124 | - console.log(req); | |
125 | - res.end('OK'); | |
124 | + //console.log('REQ:'); | |
125 | + //console.log(req); | |
126 | + | |
127 | + var body = ""; | |
128 | + req.on('data', function (chunk) { | |
129 | + body += chunk; | |
130 | + }); | |
131 | + | |
132 | + req.on('end', function () { | |
133 | + console.log('POSTed: ' + body); | |
134 | + res.writeHead(200); | |
135 | + res.end('OK'); | |
136 | + }); | |
126 | 137 | }); |
127 | 138 | |
128 | 139 | httpServer.listen(config.h2h_out.listen_port, function() { |