pagekit / vue-resource

The HTTP client for Vue.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue Resource Always throwing in error callback in firefox

rishabhgoel9797 opened this issue · comments

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