Skip to content

Instantly share code, notes, and snippets.

@NovoManu
Created August 18, 2019 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NovoManu/054439e584464a77485c85d282f5a7ec to your computer and use it in GitHub Desktop.
Save NovoManu/054439e584464a77485c85d282f5a7ec to your computer and use it in GitHub Desktop.
import axios from 'axios'
import { BaseApi } from '@/api/baseApi'
export class AxiosApi extends BaseApi {
constructor() {
super()
}
async fetch(url: string): Promise<any> {
const { data } = await axios.get(`${this.baseUrl}${url}`)
return data
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment