Comparing version 0.0.9 to 0.0.10
19
index.js
@@ -6,4 +6,2 @@ import axios from 'axios' | ||
console.log('API SERVICE initialization............', srv) | ||
const api = { | ||
@@ -13,4 +11,15 @@ init: (cfg) => { | ||
console.log('api cfg: ', info) | ||
srv = axios.create(cfg) | ||
srv = axios.create({ | ||
baseURL: info.url, | ||
headers: { | ||
// 'Access-Control-Allow-Credentials':'true', | ||
// 'Access-Control-Allow-Origin':'*', | ||
// 'Accept': 'application/json, text/plain, */*', | ||
'Content-Type': 'application/json', | ||
'env': info.env, | ||
'legajo': info.legajo, | ||
'legajoCSG': info.legajoCSG, | ||
'mockmode':info.mockmode | ||
} | ||
}) | ||
console.log('API SERVICE initialization srv:', srv) | ||
@@ -64,3 +73,3 @@ | ||
}, | ||
async info() { | ||
info() { | ||
const res = await srv.get('info') | ||
@@ -67,0 +76,0 @@ console.log('info:', res) |
{ | ||
"name": "fwk-api", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Framework with api services access(only javascript)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
2562
71