'Bringing data from Rapidmail to Salesforce Marketing Cloud

We are trying to get the recepient activity data from Rapidmail to SFMC using the below code. It throws an error saying that >Script.Util.HttpResponse{"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html","title":"Not Acceptable","status":406,"detail":"Unable to resolve Accept header to a representation"}"

          req.emptyContentHandling = 0;
          req.retries = 2;
          req.continueOnError = true;
          var baseIt = Platform.Function.Base64Encode(config.username + ":" + config.password);
          var auth = "Basic " + baseIt;
          req.setHeader("Authorization" , auth);  
          req.setHeader("Accept-Language", "*");
          req.method = "GET";
       
  var res = req.send();
  Write(res.content);```

Could you please let me know how to solve the issue.

Thanks,
Nikhila


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source