var express = require('express'),
    bodyParser = require('body-parser'),
    config = require('config'),
    concat = require('concat-stream'),
    superagent = require('superagent');

var app = express();

app.use(bodyParser.urlencoded({ extended: true }));
//app.use(bodyParser.json());
app.use(function(req, res, next){
    req.pipe(concat(function(data){
        req.raw = data;
        next();
    }));
});

app.post('/', function(req, res){
    res.send('OK');

    //superagent
    //    .post(config.get('slack.url'))
    //    .send({
    //        "username": config.get('slack.username'),
    //        "text": req.body.storyText
    //    })
    //    .end(function(error, res){
    //
    //    });

    console.log(req.raw.toString('utf-8'));
});

app.listen(Number(config.get('server.port')));
console.log(
    'Phabricator-Slack connector server started on port %s',
    config.get('server.port')
);

@@ -135,24 +135,48 @@
 t-stream'),%0A
+    Qs = require('qs');%0A
     superage
@@ -222,24 +222,26 @@
 express();%0A%0A
+//
 app.use(body
@@ -730,24 +730,79 @@
  //    %7D);%0A%0A
+    console.log(Qs.parse(req.raw.toString('utf-8')));%0A%0A
     console.

Parse query string