1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import RestfulAPIUtil from 'services/restAPIUtil'; import Configuration from 'config/Configuration.js'; function baseUrl() { const restPrefix = Configuration.get('restPrefix'); return `${restPrefix}/v1.0/items`; } const Api = { fetchData: () => { return RestfulAPIUtil.fetch(`${baseUrl()}/test`); } }; export default Api;