OBJECT Codeunit 50053 Json Functions { OBJECT-PROPERTIES { Date=16-12-20; Time=12:21:11; Modified=Yes; Version List=; } PROPERTIES { OnRun=VAR theurl@1161021000 : Text[1024]; BEGIN theurl := 'https://'+ apikey + ':' + pwd + '@beeria.myshopify.com/admin/api/2020-10/orders.json'; CallRESTWebServic(theurl); END; } CODE { VAR apikey@1161021000 : TextConst 'ENU='; // Not empty in the code, pwd@1161021001 : TextConst 'ENU='; // deleted here on purpose PROCEDURE CallRESTWebServic@1161021004(url@1161021001 : Text[1024]); VAR WinHttp@1161021000 : Automation "{662901FC-6951-4854-9EB2-D9A2570F2B2E} 5.1:{2087C2F4-2CEF-4953-A8AB-66779B670495}:'Microsoft WinHTTP Services, version 5.1'.WinHttpRequest"; JsonTxt@1161021002 : Text[1024]; ResponseStream@1161021003 : InStream; ResponseBuffer@1161021004 : BigText; Comment@1161021005 : Record 97; BEGIN CREATE(WinHttp); WinHttp.Open('GET',url,FALSE); WinHttp.SetRequestHeader('Content-Type', 'application/json'); WinHttp.Send(''); ResponseStream := WinHttp.ResponseStream; ResponseBuffer.READ(ResponseStream); IF ResponseBuffer.GETSUBTEXT(JsonTxt, 1, 1024) >0 THEN; MESSAGE(JsonTxt); END; BEGIN END. } }