Hello Everyone,
Does someone have an example connecting to HTTPS based web service and reading JSON data from FWH?
Thank you,
Hello Everyone,
Does someone have an example connecting to HTTPS based web service and reading JSON data from FWH?
Thank you,
Thank you Marc.
Is there a sample for HTTPS connection to retrieve the JSON data or can I use code below?
TRY
oHttp := CreateObject( 'MSXML2.XMLHTTP' )
CATCH
oHttp := CreateObject( 'Microsoft.XMLHTTP' )
END
TRY
oHttp:Open( "GET", cUrl, .F.)
oHttp:SetRequestHeader( "KeyId", "xxx" )
oHttp:SetRequestHeader( "Accept", "*/*" )
oHttp:SetRequestHeader( "Content-Type", "application/json" )
oHttp:Send()
oHttp:waitForResponse()
IF oHttp:Status == 200
Sysrefresh()
cWinResp := oHttp:ResponseBody
MsgAlert( cWinResp, Ptitle )
ENDIF
CATCH oError
MsgAlert( oError:Description, Ptitle )
RETURN (.F.)
END