diff options
| -rw-r--r-- | routes/calculator.coffee | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/calculator.coffee b/routes/calculator.coffee index 0ca7eee6..127335d1 100644 --- a/routes/calculator.coffee +++ b/routes/calculator.coffee @@ -12,9 +12,10 @@ exports.ticker = (req, res) -> host: 'api.bitcoinaverage.com', path: "/exchanges/CAD" - require('http').get(options, (r) -> + require('https').get(options, (r) -> r.setEncoding('utf-8') r.on('data', (chunk) -> + console.log(chunk) exchange = JSON.parse(chunk).cavirtex.rates[req.query.type].toString() res.writeHead(200, |
