import 'rxjs/add/observable/throw'; import 'rxjs/add/observable/dom/ajax'; import 'rxjs/add/observable/empty'; import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/publishReplay'; import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Subject'; export declare type AllowedHttpMethod = 'get' | 'post' | 'put' | 'delete'; export interface HttpErrorMessage { method: AllowedHttpMethod; url: string; error: Response; body?: any; [userDefinedKey: string]: any; } export interface HttpResponseWithHeaders { headers: Headers; body: T; } export declare type MethodParams = { url: string; body?: any; _opts: any; includeHeaders: boolean; }; export declare const HttpError$: Observable; export declare const createMethod: (method: AllowedHttpMethod) => CreateHttpMethod; export declare const getHttpWithResponseHeaders: (url?: string | undefined, errorAdapter$?: Subject | undefined) => Http>; declare type CreateHttpMethod = (params: MethodParams) => Observable; interface SetHttpMethodsOptions { get: CreateHttpMethod; put: CreateHttpMethod; post: CreateHttpMethod; delete: CreateHttpMethod; } export declare class Http { private url; private readonly includeHeaders; private errorAdapter$; private cloned; private request; mapFn: (v$: Observable) => Observable; private static get; private static put; private static post; private static delete; static setMethods(options: SetHttpMethodsOptions): void; private static defaultOpts; constructor(url?: string, errorAdapter$?: Subject, includeHeaders?: boolean); private _opts; setUrl(url: string): this; setHeaders(headers: any): this; setToken(token: string): this; setOpts(opts: any): this; restore(): this; get(): this; post(body?: any): this; put(body?: any): this; delete(body?: any): this; send(): Observable; clone(): Http; private params; } export {};