UNPKG

893 BTypeScriptView Raw
1import { AxiosRequestConfig } from 'axios';
2import { HttpService } from '@nestjs/common';
3import { RequestConfig, ResponseSchema } from './http.interface';
4export declare class HttpFetchService {
5 private httpService;
6 private httpOption;
7 private logger;
8 constructor(httpService: HttpService, httpOption: RequestConfig);
9 private request;
10 post<T = any>(url: string, config?: AxiosRequestConfig): Promise<ResponseSchema<T>>;
11 get<T = any>(url: string, config?: AxiosRequestConfig): Promise<ResponseSchema<T>>;
12 put<T = any>(url: string, config?: AxiosRequestConfig): Promise<ResponseSchema<T>>;
13 delete<T = any>(url: string, config?: AxiosRequestConfig): Promise<ResponseSchema<T>>;
14 patch<T = any>(url: string, config?: AxiosRequestConfig): Promise<ResponseSchema<T>>;
15 head<T = any>(url: string, config?: AxiosRequestConfig): Promise<ResponseSchema<T>>;
16}