In addition foxpro is Xbase so the sample code can be translated to Xbase++ very easily e.g.
FOXPRO SAMPLE CODE
===================
Function StockQuote()
LOCAL loRest
LOCAL lnBTls
LOCAL lnPort
LOCAL lnBAutoReconnect
LOCAL lnSuccess
LOCAL lcResponseJson
* This example requires the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
loRest = CreateObject('Chilkat_9_5_0.Rest')
* Connect to the REST server.
lnBTls = 1
lnPort = 443
lnBAutoReconnect = 1
lnSuccess = loRest.Connect("www.alphavantage.co",lnPort,lnBTls,lnBAutoReconnect)
IF (lnSuccess <> 1) THEN
? loRest.LastErrorText
RELEASE loRest
CANCEL
ENDIF
* Get a stock quote:
* Sending GET request to
https://www.alphavantage.co/query?funct ... my_api_key
lnSuccess = loRest.AddQueryParam("function","TIME_SERIES_DAILY")
lnSuccess = loRest.AddQueryParam("symbol","AAPL")
lnSuccess = loRest.AddQueryParam("apikey","my_api_key")
lcResponseJson = loRest.FullRequestNoBody("GET","/query")
IF (loRest.LastMethodSuccess <> 1) THEN
? loRest.LastErrorText
RELEASE loRest
CANCEL
ENDIF
Return
XBASE++ TRANSLATION SAMPLE CODE
===============================
Function StockQuote()
LOCAL loRest
LOCAL lnBTls
LOCAL lnPort
LOCAL lnBAutoReconnect
LOCAL lnSuccess
LOCAL lcResponseJson
* This example requires the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
loRest := CreateObject('Chilkat_9_5_0.Rest')
* Connect to the REST server.
lnBTls := 1
lnPort := 443
lnBAutoReconnect = 1
lnSuccess = loRest:Connect("www.alphavantage.co",lnPort,lnBTls,lnBAutoReconnect)
IF (lnSuccess <> 1)
? loRest:LastErrorText
RELEASE loRest
CANCEL
ENDIF
* Get a stock quote:
* Sending GET request to
https://www.alphavantage.co/query?funct ... my_api_key
lnSuccess := loRest:AddQueryParam("function","TIME_SERIES_DAILY")
lnSuccess := loRest:AddQueryParam("symbol","AAPL")
lnSuccess := loRest:AddQueryParam("apikey","my_api_key")
lcResponseJson := loRest:FullRequestNoBody("GET","/query")
IF (loRest:LastMethodSuccess <> 1)
? loRest:LastErrorText
RELEASE loRest
CANCEL
ENDIF
Return
Joe