From b58bdb4e4d4f9b97502bd5207f37929223c7e948 Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Wed, 17 Aug 2011 18:24:14 +0100 Subject: [PATCH] support jsonp api calls --- node/server.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/node/server.js b/node/server.js index 09b51d5f..201e0659 100644 --- a/node/server.js +++ b/node/server.js @@ -290,6 +290,11 @@ async.waterfall([ { response = JSON.stringify(response); apiLogger.info("RESPONSE, " + req.params.func + ", " + response); + + //is this a jsonp call, if yes, add the function call + if(req.query.jsonp) + response = req.query.jsonp + "(" + response + ")"; + res._send(response); }