getDataViaApi (path, callback, errorHandler, headerParams) { let headerObject = { 'Cache-Control': 'no-cache' } Vue.http.get(config.getApiPath(path), { headers: typeof headerParams !== 'undefined' ? Object.assign(headerObject, headerParams) : headerObject }).then( response => callback(response), error => { if (typeof errorHandler === 'function') errorHandler(error) } ) }
i am using this code for get request, works fine in chrome and safari but throws in 'error' in firefox. Please help. Its urgent
getDataViaApi (path, callback, errorHandler, headerParams) { let headerObject = { 'Cache-Control': 'no-cache' } Vue.http.get(config.getApiPath(path), { headers: typeof headerParams !== 'undefined' ? Object.assign(headerObject, headerParams) : headerObject }).then( response => callback(response), error => { if (typeof errorHandler === 'function') errorHandler(error) } ) }
i am using this code for get request, works fine in chrome and safari but throws in 'error' in firefox. Please help. Its urgent