I guess this is better than it was...

This commit is contained in:
Scott Idem
2024-03-27 17:55:31 -04:00
parent 3082c07e3e
commit 8d8fb0b638
22 changed files with 582 additions and 443 deletions

View File

@@ -92,8 +92,10 @@ export let get_object = async function get_object({api_cfg, endpoint='', headers
/* other custom settings */
});
axios_api.defaults.headers = api_cfg['headers'];
console.log('axios_api.defaults.headers:', axios_api.defaults.headers);
console.log('Additional headers:', headers);
if (log_lvl) {
console.log('axios_api.defaults.headers:', axios_api.defaults.headers);
console.log('Additional headers:', headers);
}
// console.log('Clean the headers. No _underscores_!')
let headers_cleaned = {};
@@ -113,12 +115,16 @@ export let get_object = async function get_object({api_cfg, endpoint='', headers
}
}
headers = headers_cleaned;
console.log('All headers cleaned:', headers);
if (log_lvl) {
console.log('All headers cleaned:', headers);
}
console.log('URL params:');
if (log_lvl) {
console.log('URL params:');
}
for (const prop in params) {
if (log_lvl) {
console.log(`${prop}: ${params[prop]}`);
console.log(`URL param: ${prop}: ${params[prop]}`);
}
if (params[prop] === null ) {
params[prop] = 'null';