mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 00:20:08 -04:00
16 lines
415 B
TypeScript
16 lines
415 B
TypeScript
import axios, { AxiosInstance, AxiosResponse, AxiosRequestConfig } from 'axios'
|
|
|
|
export class ApiClient {
|
|
instance: AxiosInstance
|
|
|
|
constructor() {
|
|
this.instance = axios.create({
|
|
baseURL: 'https://iptv-org.github.io/api',
|
|
responseType: 'stream'
|
|
})
|
|
}
|
|
|
|
get(url: string, options: AxiosRequestConfig): Promise<AxiosResponse> {
|
|
return this.instance.get(url, options)
|
|
}
|
|
}
|