1

I have an activity script running a SSJS HTTP GET request. I need to get the output of this request to feed a data extension.

I am using this code:

var de= DataExtension.Init("dataextension_ek");
var headerName =["Authorization","Authorization2"];
var headerValues = [value, SHA1(value2)];
var url ="url.to.request.com";

try{
   HTTP.Get(url, headerName, headerValues);
   de.Rows.Add({field1:"sucess");
}catch(e){
   de.Rows.Add({field1:e);
}

function SHA1(msg){...}

to perform the request. If i perform the same request on my local console, i get the expected results. However on activity script i keep getting an 400 error status.

Has anyone have similar issues?

Thanks,

  • headerName var is capitalized in Get, but not in above where you set value (var headername =). – Gortonington Jan 26 '18 at 12:05
  • 1
    Many thanks Gortonington. The code i provided is a partial copy of the one i am using, still i have updated the wrong written var in this example. On my script activity the code is successfully validated. – jls Jan 26 '18 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.