Post
Topic
Board Project Development
Re: New HTML5 Wallet with Native QR Code Scanning on iOS: Coin Pocket
by
enriquez
on 31/03/2014, 22:25:48 UTC
It looks good.
But I wonder why you are using Yahoo's YQL since you just need to add cors=true at the end of yours Blockchain.info's query? see: https://blockchain.info/api/blockchain_api CORS headers. The rawaddr, latestblock, unspent, and pushtx APIs are all supported by that.

Thanks!

I tried using CORS (see here https://bitcointalk.org/index.php?topic=168010.msg5582563#msg5582563), but I couldn't get the response to include the CORS header back.

For example, this should come back with a "Access-Control-Allow-Origin" header:

Code:
curl -v -H "Origin: https://btc.coinpocketapp.com" \
  -H "Access-Control-Request-Method: GET" \
  -H "Access-Control-Request-Headers: X-Requested-With" \
  -X GET \
  "https://blockchain.info/rawaddr/1HeGkvDja9GYJcKFgTpNs4LALYFkRd4bWF?cors=true"

Either I'm doing something wrong, or their API doesn't actually support CORS for the endpoints that I need.