export default (url: string, params?: any) => { return fetch(url, { method: 'GET', credentials: 'same-origin', headers: { Accept: 'application/json' }, ...params }).then(res => res.json()); };