UNPKG

1.16 kBTypeScriptView Raw
1import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
2import { Observable } from 'rxjs';
3/**
4 * @deprecated "HttpModule" (from the "@nestjs/common" package) is deprecated and will be removed in the next major release. Please, use the "@nestjs/axios" package instead.
5 */
6export declare class HttpService {
7 private readonly instance;
8 private readonly logger;
9 constructor(instance?: AxiosInstance);
10 request<T = any>(config: AxiosRequestConfig): Observable<AxiosResponse<T>>;
11 get<T = any>(url: string, config?: AxiosRequestConfig): Observable<AxiosResponse<T>>;
12 delete<T = any>(url: string, config?: AxiosRequestConfig): Observable<AxiosResponse<T>>;
13 head<T = any>(url: string, config?: AxiosRequestConfig): Observable<AxiosResponse<T>>;
14 post<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Observable<AxiosResponse<T>>;
15 put<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Observable<AxiosResponse<T>>;
16 patch<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Observable<AxiosResponse<T>>;
17 get axiosRef(): AxiosInstance;
18 private makeObservable;
19}