UNPKG

@tdb/util

Version:
11 lines (10 loc) 648 B
import { IHttpHeaders, IHttpResponse, HttpMethod, IHttpEvent } from './types'; export * from './types'; export declare const events$: import("rxjs").Observable<IHttpEvent>; export declare function request<T>(method: HttpMethod, url: string, data?: any, headers?: IHttpHeaders): Promise<IHttpResponse<T>>; export declare function headers(headers: IHttpHeaders): { get: <T>(url: string) => Promise<IHttpResponse<T>>; post: <T>(url: string, data: any) => Promise<IHttpResponse<T>>; }; export declare const get: <T>(url: string) => Promise<IHttpResponse<T>>; export declare const post: <T>(url: string, data: any) => Promise<IHttpResponse<T>>;