mirror of https://github.com/iptv-org/iptv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
399 B
TypeScript
17 lines
399 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)
|
|
}
|
|
}
|