From e303a718e9d73015163e2b730fc3f60ac30bc448 Mon Sep 17 00:00:00 2001
From: Adhidarma Hadiwinoto <gua@adhisimon.org>
Date: Wed, 22 Jul 2015 17:20:13 +0700
Subject: [PATCH] penanganan sn

---
 partner-datacell.js | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/partner-datacell.js b/partner-datacell.js
index 50a7004..5dfdb40 100644
--- a/partner-datacell.js
+++ b/partner-datacell.js
@@ -118,11 +118,22 @@ function topupRequest(task, retry) {
 }
 
 function createServer() {
+
     var httpServer = http.createServer(function(req, res) {
         console.log('Got request from partner, url: ' + req.url);
-        console.log('REQ:');
-        console.log(req);
-        res.end('OK');
+        //console.log('REQ:');
+        //console.log(req);
+        
+        var body = "";
+        req.on('data', function (chunk) {
+            body += chunk;
+        });
+        
+        req.on('end', function () {
+            console.log('POSTed: ' + body);
+            res.writeHead(200);
+            res.end('OK');
+        });
     });
     
     httpServer.listen(config.h2h_out.listen_port, function() {
-- 
1.9.0