The function below can be used handle form-data.
const formDataString = Object.keys(data).map(key => {
return encodeURIComponent(key) + '=' + encodeURIComponent(data[key]);
}).join('&');
log.debug("formDataString", formDataString);
return formDataString;
Headers format for the APIconfiguration.
const headers = {};
headers['content-type'] = 'application/x-www-form-urlencoded'
headers['Authorization'] = apikey;
headers['Accept'] = 'application/json';
headers['Accept-Encoding'] = 'gzip, deflate, br';
return headers;