import { Observable } from 'rxjs'; export declare class Http { /** ================== GET REQUESTS ========================== */ /** * Constructs a `GET` request that interprets the body as a JSON object and * returns the response body as a JSON object. * * @param url The endpoint URL. * @param options The HTTP options to send with the request. * * * @return An `Observable` of the response body as a JSON object. */ get(url: string, options?: { headers?: any | { [header: string]: string | string[]; }; observe?: 'body'; params?: { [param: string]: string | string[]; }; reportProgress?: boolean; responseType?: 'json'; withCredentials?: boolean; }): Observable; /** ================== POST REQUESTS ========================== */ /** * Constructs a `POST` request that interprets the body as a * JSON object and returns the response body as a JSON object. * * @param url The endpoint URL. * @param body The content to replace with. * @param options HTTP options * * @return An `Observable` of the response, with the response body as a JSON object. */ post(url: string, body: any | null, options?: { headers?: any | { [header: string]: string | string[]; }; observe?: 'body'; params?: { [param: string]: string | string[]; }; reportProgress?: boolean; responseType?: 'json'; withCredentials?: boolean; }): Observable; /** ================== PUT REQUESTS ========================== */ /** * Constructs a `POST` request that interprets the body as a * JSON object and returns the response body as a JSON object. * * @param url The endpoint URL. * @param body The content to replace with. * @param options HTTP options * * @return An `Observable` of the response, with the response body as a JSON object. */ put(url: string, body: any | null, options?: { headers?: any | { [header: string]: string | string[]; }; observe?: 'body'; params?: { [param: string]: string | string[]; }; reportProgress?: boolean; responseType?: 'json'; withCredentials?: boolean; }): Observable; /** ================== Method for all type of Requests ================== */ request(method: string, url: any, options?: any): Observable; }