Class Axios

Description

Axios OOP static interface

Features:

  • OOP
  • DI

Example

import { Axios } from '@biorate/axios';

class Yandex extends Axios {
public baseURL = 'https://yandex.ru';
}

(async () => {
const response = await Yandex.fetch<string>();
console.log(response.status); // 200
console.log(response.data); // <!DOCTYPE html><html ...
})();

Hierarchy

Constructors

Properties

#client: AxiosInstance

Description

Axios client cache

cache: WeakMap<typeof Axios, Axios> = ...

Description

Axios instance cache

mocks: WeakMap<typeof Axios, {
    value: boolean;
}> = ...

Type declaration

  • value: boolean

Description

Axios instance cache

Accessors

Methods

Generated using TypeDoc