diff options
| author | Adam Soltys <[email protected]> | 2014-05-04 11:34:48 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2014-05-04 11:34:48 -0700 |
| commit | c9ab61d53677d5ab59a01936f61aafa135478eeb (patch) | |
| tree | 2c16791d846115a80e5afe85f864140d7bdbbd88 | |
| parent | 0bb179febda60cb89140cc5a6ec0ede2cf2f6227 (diff) | |
| download | coinos-server-c9ab61d53677d5ab59a01936f61aafa135478eeb.tar.gz coinos-server-c9ab61d53677d5ab59a01936f61aafa135478eeb.zip | |
Bitcoin Average API uses https now
| -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, |
