I am trying to return an array of Event objects using SSJS HTTP GET with an authorization bearer header. This is my current script but it isn't loading anything. Would anyone be able to assist? I am very new to SSJS. Thanks!
<script runat="server"> Platform.Load("Core","1"); var apitoken = Variable.GetValue("@apitoken"); var url = "https://xxxxx.com.au/api/v1/events"; var headerNames = ("Authorization"); var headerValues = ("Bearer", apitoken); var response = HTTP.Get(url, headerNames, headerValues); Variable.SetValue("response",response.Content); </script>