blinktrade/frontend-legacy

Server isn't returning a JSONP response

Closed this issue · 4 comments

Hello Blinktrade,

I'm following your documentation and I've found this error when trying to access the public API:

import { BlinkTradeRest } from 'blinktrade';
const BlinkTrade = new BlinkTradeRest({
    currency: 'BRL',
    prod: false
  })
BlinkTrade.ticker().then(console.log)

screen shot 2018-01-02 at 23 41 23

Look like the library is requiring a JSONP response, but the server returns a JSON response.
Is it a bug in the library/server?

The server doesn't support jsonp

Hi @pinhopro, thanks for your reply.

Yes, I see.

So I don't understand why the Blinktrade library is requesting a JSONP format. I'll try again, thanks!

Hi @Rodrigora

We deprecated jsonp and we already ship a fix on the library (0.0.17), take a look at this issue for a better understanding (blinktrade/BlinkTradeJS#32) and just update the library.