UNPKG

@rxx/http

Version:
39 lines (38 loc) 1.18 kB
import { StateHandler, Advices } from '@rxx/core'; import { Observable, Subscription, ConnectableObservable } from 'rxjs'; import { HttpConfig, Fetch } from './types'; export declare class HttpHandler extends StateHandler { static displayName: string; private static _maxHistoryLength; static maxHistoryLength: number; static readonly maxHistoryLenght: number; private history; constructor(a?: Advices); clone(): HttpHandler; subscribe(props: { http: Observable<{ type: string; request: HttpConfig; } | { type: string; request: HttpConfig; }[]> | { [key: string]: Observable<HttpConfig> | ConnectableObservable<HttpConfig>; }; }): Subscription; push(key: string, args?: any): Promise<any>; private handleUploadResonse; private notifyUploading; private notifyResponse; private handleResponse; private processHeaders; protected getFetcher(): Fetch; private get; private post; private put; private patch; private delete; private upload; private getResponse; private getResponseTypeFromHeader; }