import axios from 'axios'; export default class { constructor({url, params}) { this.url = url; this.params = params; this.isLoadRequest = false; this.responseChart = null; } async request() { if (!this.isLoadRequest) { let response = await axios.get(this.url, {params: this.params}); if (response && response.status === 200) { this.responseChart = response.data; this.isLoadRequest = true; } } return this.responseChart; } }