I’m writing a program that needs to retrieve the current price of Bitcoin from the CoinBase service. According to the docs, doing a GETrequest to https://api.coinbase.com/v1/currencies/exchange_rates will return a JSON formatted list of currency conversions and, if you that URL in the browser, it does. But, for some odd reason, Xojo 2013r4.1 is returning NOTHING!
Here is the code I’m using:
Dim secureConn as new HTTPSecureSocket
Dim serverResp as String
Dim targetURL as String = “https://api.coinbase.com/v1/currencies/exchange_rates”
secureConn.Secure = True
serverResp = secureConn.Get(targetURL, 0)
This code returns nothing. If I put another URL in the targetURL variable, it returns the HTML as expected.
Any idea what might be going on?