I guess this is better than it was...
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user