HttpProvider.d.ts 628 B

123456789101112131415
  1. import { Method } from 'axios';
  2. import { HeadersType, HttpProviderInstance } from '../../types/Providers.js';
  3. export default class HttpProvider {
  4. host: string;
  5. timeout: number;
  6. user: string;
  7. password: string;
  8. headers: HeadersType;
  9. statusPage: string;
  10. instance: HttpProviderInstance;
  11. constructor(host: string, timeout?: number, user?: string, password?: string, headers?: HeadersType, statusPage?: string);
  12. setStatusPage(statusPage?: string): void;
  13. isConnected(statusPage?: string): Promise<boolean | 0>;
  14. request<T = unknown>(url: string, payload?: {}, method?: Method): Promise<T>;
  15. }